mirror of https://github.com/aminya/setup-cpp
fix: fix gcc on windows
This commit is contained in:
parent
ca064b68e0
commit
78ad81e393
|
@ -21,6 +21,8 @@ export async function setupGcc(version: string, _setupCppDir: string, arch: stri
|
||||||
} else if (arch === "ia32" && existsSync("C:/tools/mingw32/bin")) {
|
} else if (arch === "ia32" && existsSync("C:/tools/mingw32/bin")) {
|
||||||
binDir = "C:/tools/mingw32/bin"
|
binDir = "C:/tools/mingw32/bin"
|
||||||
addPath(binDir)
|
addPath(binDir)
|
||||||
|
} else if (existsSync("C:/ProgramData/Chocolatey/bin/g++.exe")) {
|
||||||
|
binDir = "C:/ProgramData/Chocolatey/bin/g++.exe"
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* eslint-disable require-atomic-updates */
|
/* eslint-disable require-atomic-updates */
|
||||||
|
import { addPath } from "@actions/core"
|
||||||
import { exec } from "@actions/exec"
|
import { exec } from "@actions/exec"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { setupChocolatey } from "../../chocolatey/chocolatey"
|
import { setupChocolatey } from "../../chocolatey/chocolatey"
|
||||||
|
@ -24,5 +25,7 @@ export async function setupChocoPack(name: string, version?: string, args: strin
|
||||||
throw new Error(`Failed to install ${name} ${version}`)
|
throw new Error(`Failed to install ${name} ${version}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
return { binDir: "C:/ProgramData/Chocolatey/bin/" }
|
const binDir = "C:/ProgramData/Chocolatey/bin/"
|
||||||
|
addPath(binDir)
|
||||||
|
return { binDir }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue