From 5bcb2884a4a15fa353ba95a00b157da22a0eec2a Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Fri, 13 Sep 2019 07:03:38 -0400 Subject: [PATCH] fix: Remove '/.node-spawn-wrap-' from lib/homedir.js export This would cause lib/mungers/env.js to set SPAWN_WRAP_SHIM_ROOT including '/.node-spawn-wrap-' when that variable should point to the directory which should contain `.node-spawn-wrap-*`. --- index.js | 2 +- lib/homedir.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 70ea44f..edadc58 100644 --- a/index.js +++ b/index.js @@ -106,7 +106,7 @@ function setup(argv, env) { } const key = process.pid + '-' + crypto.randomBytes(6).toString('hex') - let workingDir = homedir + key + let workingDir = path.resolve(homedir, `.node-spawn-wrap-${key}`) const settings = JSON.stringify({ module: __filename, diff --git a/lib/homedir.js b/lib/homedir.js index c0c0f5f..ee49f28 100644 --- a/lib/homedir.js +++ b/lib/homedir.js @@ -2,7 +2,4 @@ const os = require('os') -const home = process.env.SPAWN_WRAP_SHIM_ROOT || os.homedir() -const homedir = home + '/.node-spawn-wrap-' - -module.exports = homedir +module.exports = process.env.SPAWN_WRAP_SHIM_ROOT || os.homedir()