Skip to content

Commit 3a6ef50

Browse files
committed
added --ignore-scripts for all npm/yarn installs
1 parent 77d1ff3 commit 3a6ef50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/finder-builder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ function npmBuilder(filepath: string, displayPath: string, flags: Flags, buildEn
12621262
debug('Performing npm build for %s', filepath)
12631263
const cmd = flags.yarn ? 'yarn' : 'npm'
12641264
const npmRunBuild = buildScriptExists(filepath)
1265-
const args = npmRunBuild ? ['install', '&&', cmd, 'run', 'build'] : ['install', '--production']
1265+
const args = npmRunBuild ? ['install','--ignore-scripts', '&&', cmd, 'run', 'build'] : ['install','--ignore-scripts', '--production']
12661266
const infoMsg = [cmd, ...args].join(' ')
12671267
if (flags.incremental) {
12681268
debug('Detected incremental build')
@@ -1279,7 +1279,7 @@ function npmBuilder(filepath: string, displayPath: string, flags: Flags, buildEn
12791279
} else {
12801280
debug('Build was not incremental')
12811281
}
1282-
return build(cmd, args, filepath, displayPath, infoMsg, `${cmd} install`, flags.verboseBuild, buildEnv, slice, feedback).then(
1282+
return build(cmd, args, filepath, displayPath, infoMsg, `${cmd} install --ignore-scripts`, flags.verboseBuild, buildEnv, slice, feedback).then(
12831283
() => makeNpmPackageAppearBuilt(filepath))
12841284
}
12851285

0 commit comments

Comments
 (0)