From c77dfe5251fb494f8c6886b22d2c4706b90d5c16 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 16 Sep 2021 13:51:23 -0500 Subject: [PATCH] fix: fix gcc path on windows --- src/gcc/gcc.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gcc/gcc.ts b/src/gcc/gcc.ts index 969b4039..cc18ad81 100644 --- a/src/gcc/gcc.ts +++ b/src/gcc/gcc.ts @@ -11,10 +11,15 @@ export async function setupGcc(version: string, _setupCppDir: string, arch: stri await setupChocoPack("gcc-arm-embedded", version) } await setupChocoPack("mingw", version) + let binDir: string | undefined if (arch === "x64") { - addPath("C:\\tools\\mingw64\\bin") + binDir = "C:\\tools\\mingw64\\bin" + addPath(binDir) + return { binDir } } else if (arch === "ia32") { - addPath("C:\\tools\\mingw32\\bin") + binDir = "C:\\tools\\mingw32\\bin" + addPath(binDir) + return { binDir } } return undefined }