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 and iliapolo committed Nov 7, 2021
1 parent 30a001f commit 1cf1eee
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
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
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 1cf1eee

Please sign in to comment.