Skip to content
Snippets Groups Projects
Commit a39a86c6 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(yarn): Filter out pure-lockfile option from yarnrc

A repository with .yarnrc specifying pure-lockfile was preventing our yarn from saving a lockfile too! Now filter it out before writing the yarnrc to our tmp directory.

Closes #507
parent 47044a11
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,11 @@ async function generateLockFile(
fs.writeFileSync(path.join(tmpDir.name, '.npmrc'), npmrcContent);
}
if (yarnrcContent) {
fs.writeFileSync(path.join(tmpDir.name, '.yarnrc'), yarnrcContent);
const filteredYarnrc = yarnrcContent.replace(
'--install.pure-lockfile true',
''
);
fs.writeFileSync(path.join(tmpDir.name, '.yarnrc'), filteredYarnrc);
}
logger.debug('Spawning yarn install');
// Use an embedded yarn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment