@@ -38,31 +38,31 @@ function computeExtraArgs(options: BuildMetadata) {
38
38
export function installDependencies ( appDir : string , electronVersion : string , arch : string = process . arch , additionalArgs : Array < string > ) : Promise < any > {
39
39
log ( `Installing app dependencies for arch ${ arch } to ${ appDir } ` )
40
40
let execPath = process . env . npm_execpath || process . env . NPM_CLI_JS
41
- const npmExecArgs = [ "install" , "--production" ]
41
+ const execArgs = [ "install" , "--production" ]
42
42
43
43
const isYarn = isYarnPath ( execPath )
44
44
if ( ! isYarn ) {
45
45
if ( process . env . NPM_NO_BIN_LINKS === "true" ) {
46
- npmExecArgs . push ( "--no-bin-links" )
46
+ execArgs . push ( "--no-bin-links" )
47
47
}
48
- npmExecArgs . push ( "--cache-min" , "999999999" )
48
+ execArgs . push ( "--cache-min" , "999999999" )
49
49
}
50
50
51
51
if ( execPath == null ) {
52
52
execPath = getPackageToolPath ( )
53
53
}
54
54
else {
55
- npmExecArgs . unshift ( execPath )
55
+ execArgs . unshift ( execPath )
56
56
execPath = process . env . npm_node_execpath || process . env . NODE_EXE || "node"
57
57
}
58
58
59
59
for ( let a of additionalArgs ) {
60
60
if ( ! isYarn || a !== "--build-from-source" ) {
61
- npmExecArgs . push ( a )
61
+ execArgs . push ( a )
62
62
}
63
63
}
64
64
65
- return spawn ( execPath , npmExecArgs , {
65
+ return spawn ( execPath , execArgs , {
66
66
cwd : appDir ,
67
67
env : getGypEnv ( electronVersion , arch ) ,
68
68
} )
@@ -152,6 +152,7 @@ export async function rebuild(appDir: string, electronVersion: string, arch: str
152
152
}
153
153
else {
154
154
execArgs . push ( "rebuild" )
155
+ execArgs . push ( ...additionalArgs )
155
156
execArgs . push ( ...nativeDeps . map ( it => path . basename ( it ) ) )
156
157
await spawn ( execPath , execArgs , { cwd : appDir , env : env } )
157
158
}
0 commit comments