Open 73rhodes opened 3 months ago
I can't open a PR against a tag, but the steps would just be:
git co v2.0.0
Make code changes...
git add -A
git commit -m "Fixed signal handling bug."
git tag -a -m "Tag version 2.0.1, a bugfix release" v2.0.1
git push --tags
... then npm publish.
See https://github.com/istanbuljs/nyc/pull/1546, I'm actively working to move nyc
to using foreground-child@^3.0.0
.
Context
As part of an effort to augment mocha toolchains with standard posix exit codes, we found a key component of our toolchain (
nyc
) useforeground-child@2.0.0
which manifests this issue.the error
foreground-child@2.0.0
can throw an invalid arg type error under certain conditions:root cause
This line assigns a value
128 + signal
, resulting in a string eg."128SIGABRT"
instead of a numeric value.suggested fix
Use
os.constants.signals
for numerical values ofsignal
strings; eg.reason to back-patch
Since
foreground-child: ^2.0.0
is used by the latest version ofnyc
it would be helpful to patch v2.0.0 to fix the issue for projects that won't upgrade toforeground-child@3.x.x
right away.steps to reproduce
Given the test file
oom.unit.js
Running the following command reproduces the error