diff --git a/build/download_binaries.ts b/build/download_binaries.ts index 61c38eae06..826c713fd3 100644 --- a/build/download_binaries.ts +++ b/build/download_binaries.ts @@ -15,8 +15,8 @@ import type { SingleBar } from "cli-progress"; import { MultiBar } from "cli-progress"; import { extract } from "tar-stream"; import gunzip from "gunzip-maybe"; -import { getBinaryName } from "../src/common/vars"; import { isErrnoException, setTimeoutFor } from "../src/common/utils"; +import AbortController from "abort-controller"; type Response = FetchModule.Response; type RequestInfo = FetchModule.RequestInfo; @@ -24,6 +24,14 @@ type RequestInit = FetchModule.RequestInit; const pipeline = promisify(_pipeline); +const getBinaryName = (binaryName: string, { forPlatform }: { forPlatform : string }) => { + if (forPlatform === "windows") { + return `${binaryName}.exe`; + } + + return binaryName; +}; + interface BinaryDownloaderArgs { readonly version: string; readonly platform: SupportedPlatform;