Skip to content

Commit 1976f1a

Browse files
committed
fix(cdk-assets): packaging assets is broken on Node older than 14.17 (#23994)
This reverts commit 18e0481. Closes #23859 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 7f4e35e commit 1976f1a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/cdk-assets/lib/private/archive.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { randomUUID } from 'crypto';
21
import { createWriteStream, promises as fs } from 'fs';
32
import * as path from 'path';
43
import * as glob from 'glob';
@@ -12,7 +11,7 @@ type Logger = (x: string) => void;
1211
export async function zipDirectory(directory: string, outputFile: string, logger: Logger): Promise<void> {
1312
// We write to a temporary file and rename at the last moment. This is so that if we are
1413
// interrupted during this process, we don't leave a half-finished file in the target location.
15-
const temporaryOutputFile = `${outputFile}.${randomUUID()}._tmp`;
14+
const temporaryOutputFile = `${outputFile}._tmp`;
1615
await writeZipFile(directory, temporaryOutputFile);
1716
await moveIntoPlace(temporaryOutputFile, outputFile, logger);
1817
}
@@ -97,4 +96,4 @@ async function pathExists(x: string) {
9796
}
9897
throw e;
9998
}
100-
}
99+
}

0 commit comments

Comments
 (0)