Skip to content

Commit cc8dd69

Browse files
authored
fix(lambda-nodejs): yarn berry goes into immutable mode in CI (#17086)
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*
1 parent 37f8a9f commit cc8dd69

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@aws-cdk/aws-lambda-nodejs/lib/package-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class PackageManager {
2020

2121
public static YARN = new PackageManager({
2222
lockFile: 'yarn.lock',
23-
installCommand: ['yarn', 'install'],
23+
installCommand: ['yarn', 'install', '--no-immutable'],
2424
runCommand: ['yarn', 'run'],
2525
});
2626

packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ test('Detects yarn.lock', () => {
342342
assetHashType: AssetHashType.OUTPUT,
343343
bundling: expect.objectContaining({
344344
command: expect.arrayContaining([
345-
expect.stringMatching(/yarn\.lock.+yarn install/),
345+
expect.stringMatching(/yarn\.lock.+yarn install --no-immutable/),
346346
]),
347347
}),
348348
});

0 commit comments

Comments
 (0)