Deduplicate the list of path entries for MSYS2

This commit is contained in:
Benoit Daloze
2020-03-24 18:49:35 +01:00
parent f70e6bf7d0
commit ae39a8d7d2
2 changed files with 6 additions and 10 deletions
+3 -5
View File
@@ -13,6 +13,7 @@ const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
// standard MSYS2 location, found by 'devkit'
const msys2 = 'C:\\msys64'
const msys2PathEntries = [`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`]
export function getAvailableVersions(platform, engine) {
if (engine === 'ruby') {
@@ -73,7 +74,7 @@ async function setupMingw(version) {
await symLinkToEmbeddedMSYS2()
}
return [`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`]
return msys2PathEntries
}
async function setupMSWin() {
@@ -94,10 +95,7 @@ async function setupMSWin() {
await symLinkToEmbeddedMSYS2()
}
let pathAry = addVCVARSEnv()
// add MSYS2 paths for misc gnu utilities like bison and ragel
pathAry.push(`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`)
return pathAry
return [...addVCVARSEnv(), ...msys2PathEntries]
}
/* Sets MSVC environment for use in Actions