Skip to content

Commit

Permalink
fix(lambda-nodejs): yarn berry goes into immutable mode in CI
Browse files Browse the repository at this point in the history
Add the `--no-immutable` flag when running `yarn`.

Closes #17082
  • Loading branch information
jogold committed Oct 21, 2021
1 parent a129046 commit 3846fe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-nodejs/lib/package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class PackageManager {

public static YARN = new PackageManager({
lockFile: 'yarn.lock',
installCommand: ['yarn', 'install'],
installCommand: ['yarn', 'install', '--no-immutable'],
runCommand: ['yarn', 'run'],
});

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ test('Detects yarn.lock', () => {
assetHashType: AssetHashType.OUTPUT,
bundling: expect.objectContaining({
command: expect.arrayContaining([
expect.stringMatching(/yarn\.lock.+yarn install/),
expect.stringMatching(/yarn\.lock.+yarn install --no-immutable/),
]),
}),
});
Expand Down

0 comments on commit 3846fe8

Please sign in to comment.