Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actually install the version that we're saying we're installing #321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/makePatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function makePatch({
try {
// try first without ignoring scripts in case they are required
// this works in 99.99% of cases
spawnSafeSync(`yarn`, ["install", "--ignore-engines"], {
spawnSafeSync(`yarn`, ["install", "--ignore-engines", `${packageDetails.name}@${packageVersion}`], {
cwd: tmpRepoNpmRoot,
logStdErrOnError: false,
})
Expand All @@ -136,7 +136,7 @@ export function makePatch({
// an implicit context which we havn't reproduced
spawnSafeSync(
`yarn`,
["install", "--ignore-engines", "--ignore-scripts"],
["install", "--ignore-engines", "--ignore-scripts", `${packageDetails.name}@${packageVersion}`],
{
cwd: tmpRepoNpmRoot,
},
Expand All @@ -150,15 +150,15 @@ export function makePatch({
try {
// try first without ignoring scripts in case they are required
// this works in 99.99% of cases
spawnSafeSync(`npm`, ["i", "--force"], {
spawnSafeSync(`npm`, ["i", "--force", `${packageDetails.name}@${packageVersion}`], {
cwd: tmpRepoNpmRoot,
logStdErrOnError: false,
stdio: "ignore",
})
} catch (e) {
// try again while ignoring scripts in case the script depends on
// an implicit context which we havn't reproduced
spawnSafeSync(`npm`, ["i", "--ignore-scripts", "--force"], {
spawnSafeSync(`npm`, ["i", "--ignore-scripts", "--force", `${packageDetails.name}@${packageVersion}`], {
cwd: tmpRepoNpmRoot,
stdio: "ignore",
})
Expand Down