Skip to content

Commit c915357

Browse files
authored
chore: Remove --silent flag from layer build script and create dir prior (#17091)
CI for the 10.0.0-alpha.0 release is failing at the build step but it's unclear why. This hopefully reveals more info.
1 parent 5eb036f commit c915357

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/aws-serverless/scripts/buildLambdaLayer.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ function run(cmd: string, options?: childProcess.ExecSyncOptions): string {
2222
async function buildLambdaLayer(): Promise<void> {
2323
console.log('Building Lambda layer.');
2424
console.log('Installing local @sentry/aws-serverless into build/aws/dist-serverless/nodejs.');
25-
run('npm install . --prefix ./build/aws/dist-serverless/nodejs --install-links --silent');
25+
26+
console.log('Creating target directory for npm install.');
27+
fsForceMkdirSync('./build/aws/dist-serverless/nodejs');
28+
29+
run('npm install . --prefix ./build/aws/dist-serverless/nodejs --install-links');
2630

2731
await pruneNodeModules();
2832
fs.rmSync('./build/aws/dist-serverless/nodejs/package.json', { force: true });
@@ -60,7 +64,7 @@ buildLambdaLayer();
6064
*/
6165
function fsForceMkdirSync(path: string): void {
6266
fs.rmSync(path, { recursive: true, force: true });
63-
fs.mkdirSync(path);
67+
fs.mkdirSync(path, { recursive: true });
6468
}
6569

6670
async function pruneNodeModules(): Promise<void> {

0 commit comments

Comments
 (0)