Skip to content

Commit

Permalink
fix(MongoInstance): use environment variable "NODE" before "argv[0]"
Browse files Browse the repository at this point in the history
fixes #177
  • Loading branch information
hasezoey authored and nodkz committed Sep 8, 2020
1 parent 76889a6 commit 611f227
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -204,7 +204,7 @@ export default class MongoInstance {
this.debug(`Called MongoInstance._launchKiller(parent: ${parentPid}, child: ${childPid}):`);
// spawn process which kills itself and mongo process if current process is dead
const killer = spawnChild(
process.argv[0],
process.env['NODE'] ?? process.argv[0], // try Environment variable "NODE" before using argv[0]
[
path.resolve(__dirname, '../../scripts/mongo_killer.js'),
parentPid.toString(),
Expand Down

0 comments on commit 611f227

Please sign in to comment.