From d670b102cb2b7eaacecbdf4c1222562ce001dbcf Mon Sep 17 00:00:00 2001 From: Jesse Houwing Date: Tue, 19 Apr 2022 22:54:54 +0200 Subject: [PATCH] And force-truncate the file --- BuildTasks/Common/Common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildTasks/Common/Common.ts b/BuildTasks/Common/Common.ts index 065591f0..5585256c 100644 --- a/BuildTasks/Common/Common.ts +++ b/BuildTasks/Common/Common.ts @@ -13,7 +13,7 @@ function writeBuildTempFile(taskName: string, data: any): string { const tempFile = tmp.tmpNameSync({ prefix: taskName, postfix: ".tmp", tmpdir: tempDir }); tl.debug(`Generating Build temp file: ${tempFile}`); - tl.writeFile(tempFile, data, { mode: 0o600, encoding: "utf8"} ); + tl.writeFile(tempFile, data, { mode: 0o600, encoding: "utf8", flag: "wx+"} ); return tempFile; }