Skip to content

Commit 643abda

Browse files
committed
Add --ignore-scripts to npm install of fix
1 parent d58ddb3 commit 643abda

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/commands/fix/npm-fix.mts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ async function install(
2929
} as InstallOptions
3030
try {
3131
await runAgentInstall(pkgEnvDetails, {
32-
args,
32+
args: [
33+
'--ignore-scripts',
34+
'--no-audit',
35+
'--no-fund',
36+
'--no-progress',
37+
'--no-save',
38+
'--silent',
39+
...(args ?? []),
40+
],
3341
spinner,
3442
stdio: isDebug('stdio') ? 'inherit' : 'ignore',
3543
})

src/commands/fix/pnpm-fix.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ async function install(
4040
try {
4141
await runAgentInstall(pkgEnvDetails, {
4242
args: [
43-
...(args ?? []),
4443
// Enable pnpm updates to pnpm-lock.yaml in CI environments.
4544
// https://pnpm.io/cli/install#--frozen-lockfile
4645
'--no-frozen-lockfile',
4746
// Enable a non-interactive pnpm install
4847
// https://github.com/pnpm/pnpm/issues/6778
4948
'--config.confirmModulesPurge=false',
49+
...(args ?? []),
5050
],
5151
spinner,
5252
stdio: isDebug('stdio') ? 'inherit' : 'ignore',

test/socket-npm.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ for (const npmDir of ['npm9', 'npm10', 'npm11']) {
4949
entryPath,
5050
'npm',
5151
'install',
52-
'bowserify',
5352
'--no-audit',
5453
'--no-fund',
54+
'bowserify',
5555
],
5656
{
5757
cwd: path.join(npmFixturesPath, 'lacking-typosquat'),

0 commit comments

Comments
 (0)