Skip to content

Commit

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

Closes #17082


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
jogold authored Nov 5, 2021
1 parent 37f8a9f commit cc8dd69
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 @@ -342,7 +342,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 cc8dd69

Please sign in to comment.