Skip to content

Commit

Permalink
fix: Remove '/.node-spawn-wrap-' from lib/homedir.js export
Browse files Browse the repository at this point in the history
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-*`.
  • Loading branch information
coreyfarrell committed Oct 7, 2019
1 parent 760178b commit 5bcb288
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions lib/homedir.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 5bcb288

Please sign in to comment.