diff --git a/workspaces/arborist/lib/arborist/rebuild.js b/workspaces/arborist/lib/arborist/rebuild.js index 53c6f63e77d94..d20870721e6c1 100644 --- a/workspaces/arborist/lib/arborist/rebuild.js +++ b/workspaces/arborist/lib/arborist/rebuild.js @@ -350,6 +350,7 @@ module.exports = cls => class Builder extends cls { pkg, stdio, env, + nodeGyp: this.options.nodeGyp, scriptShell: this.options.scriptShell, } const p = runScript(runOpts).catch(er => { diff --git a/workspaces/arborist/test/arborist/rebuild.js b/workspaces/arborist/test/arborist/rebuild.js index 6c3062be89a00..f418988adc9c1 100644 --- a/workspaces/arborist/test/arborist/rebuild.js +++ b/workspaces/arborist/test/arborist/rebuild.js @@ -553,7 +553,8 @@ t.test('rebuild node-gyp dependencies lacking both preinstall and install script }, }), }) - const arb = new Arborist({ path, dangerouslyAllowAllScripts: true }) + const nodeGyp = '/test/node-gyp.js' + const arb = new Arborist({ path, dangerouslyAllowAllScripts: true, nodeGyp }) await arb.rebuild() t.match(RUNS, [ { @@ -569,6 +570,7 @@ t.test('rebuild node-gyp dependencies lacking both preinstall and install script npm_package_peer: '', npm_package_dev_optional: '', }, + nodeGyp, scriptShell: undefined, }, ])