Skip to content

Commit

Permalink
Update archive.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr authored Jan 18, 2023
1 parent 22f5102 commit a20c604
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/cdk-assets/lib/private/archive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ type Logger = (x: string) => void;
export async function zipDirectory(directory: string, outputFile: string, logger: Logger): Promise<void> {
// We write to a temporary file and rename at the last moment. This is so that if we are
// interrupted during this process, we don't leave a half-finished file in the target location.
const outputFileDirectory = path.dirname(outputFile);
const temporaryOutputFile = `${outputFileDirectory}${path.sep}${randomUUID()}._tmp`;
const temporaryOutputFile = `${outputFile}.${randomUUID()}._tmp`;
await writeZipFile(directory, temporaryOutputFile);
await moveIntoPlace(temporaryOutputFile, outputFile, logger);
}
Expand Down

0 comments on commit a20c604

Please sign in to comment.