Skip to content

Commit abc3197

Browse files
authored
Merge pull request #952 from dscho/fix-on-arm64
Ensure that `please.sh` finds `git.exe`
2 parents a1cddb5 + b66f976 commit abc3197

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

dist/index.js

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

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/git.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ const gitRoot = fs.existsSync(externalsGitDir)
1111
? externalsGitDir
1212
: gitForWindowsRoot
1313

14-
export const gitForWindowsUsrBinPath = `${gitRoot}/usr/bin`
14+
const gitForWindowsBinPaths = ['clangarm64', 'mingw64', 'mingw32', 'usr'].map(
15+
p => `${gitRoot}/${p}/bin`
16+
)
17+
export const gitForWindowsUsrBinPath =
18+
gitForWindowsBinPaths[gitForWindowsBinPaths.length - 1]
1519
const gitExePath = `${gitRoot}/cmd/git.exe`
1620

1721
/*
@@ -216,7 +220,7 @@ export async function getViaGit(
216220
LC_CTYPE: 'C.UTF-8',
217221
CHERE_INVOKING: '1',
218222
MSYSTEM: 'MINGW64',
219-
PATH: `${gitForWindowsUsrBinPath}${delimiter}${process.env.PATH}`
223+
PATH: `${gitForWindowsBinPaths.join(delimiter)}${delimiter}${process.env.PATH}`
220224
},
221225
stdio: [undefined, 'inherit', 'inherit']
222226
}

0 commit comments

Comments
 (0)