Skip to content

Commit 2e400e0

Browse files
committed
use npm --force when installing. fixes #300
1 parent 7839140 commit 2e400e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/makePatch.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,17 @@ export function makePatch({
150150
try {
151151
// try first without ignoring scripts in case they are required
152152
// this works in 99.99% of cases
153-
spawnSafeSync(`npm`, ["i"], {
153+
spawnSafeSync(`npm`, ["i", "--force"], {
154154
cwd: tmpRepoNpmRoot,
155155
logStdErrOnError: false,
156-
stdio: 'ignore',
156+
stdio: "ignore",
157157
})
158158
} catch (e) {
159159
// try again while ignoring scripts in case the script depends on
160160
// an implicit context which we havn't reproduced
161-
spawnSafeSync(`npm`, ["i", "--ignore-scripts"], {
161+
spawnSafeSync(`npm`, ["i", "--ignore-scripts", "--force"], {
162162
cwd: tmpRepoNpmRoot,
163-
stdio: 'ignore',
163+
stdio: "ignore",
164164
})
165165
}
166166
}

0 commit comments

Comments
 (0)