Skip to content

Commit ae39a8d

Browse files
committed
Deduplicate the list of path entries for MSYS2
1 parent f70e6bf commit ae39a8d

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

dist/index.js

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

windows.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
1313

1414
// standard MSYS2 location, found by 'devkit'
1515
const msys2 = 'C:\\msys64'
16+
const msys2PathEntries = [`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`]
1617

1718
export function getAvailableVersions(platform, engine) {
1819
if (engine === 'ruby') {
@@ -73,7 +74,7 @@ async function setupMingw(version) {
7374
await symLinkToEmbeddedMSYS2()
7475
}
7576

76-
return [`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`]
77+
return msys2PathEntries
7778
}
7879

7980
async function setupMSWin() {
@@ -94,10 +95,7 @@ async function setupMSWin() {
9495
await symLinkToEmbeddedMSYS2()
9596
}
9697

97-
let pathAry = addVCVARSEnv()
98-
// add MSYS2 paths for misc gnu utilities like bison and ragel
99-
pathAry.push(`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`)
100-
return pathAry
98+
return [...addVCVARSEnv(), ...msys2PathEntries]
10199
}
102100

103101
/* Sets MSVC environment for use in Actions

0 commit comments

Comments
 (0)