-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add argv test, check for process.env over {}
- Loading branch information
1 parent
ecd98e8
commit b449baf
Showing
4 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const path = require('path'); | ||
const childProcess = require('child_process'); | ||
const argv = process.argv; | ||
|
||
let exitCode = 0; | ||
if (argv.length !== 3) { | ||
exitCode = 1; | ||
} | ||
|
||
const crashPath = path.join(__dirname, 'node-crash.js'); | ||
const child = childProcess.fork(crashPath, { silent: true }); | ||
child.on('exit', () => process.exit(exitCode)); |