diff --git a/ts-binary-wrapper/src/common.ts b/ts-binary-wrapper/src/common.ts index 137d6ad6f1..b939855160 100644 --- a/ts-binary-wrapper/src/common.ts +++ b/ts-binary-wrapper/src/common.ts @@ -3,7 +3,7 @@ import * as os from 'os'; import * as fs from 'fs'; import { spawnSync } from 'child_process'; import * as https from 'https'; -import { randomInt, createHash } from 'crypto'; +import { createHash } from 'crypto'; export const versionFile = path.join(__dirname, 'generated', 'version'); export const shasumFile = path.join(__dirname, 'generated', 'sha256sums.txt'); @@ -198,7 +198,7 @@ export function downloadExecutable( ): Promise { return new Promise(function(resolve) { const options = new URL(downloadUrl); - const temp = path.join(__dirname, randomInt(100000).toString()); + const temp = path.join(__dirname, Date.now().toString()); const fileStream = fs.createWriteStream(temp); const cleanupAfterError = (exitCode: number) => {