Skip to content

Commit

Permalink
Fix windows git usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Feb 16, 2024
1 parent b1094a1 commit 60238a6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/hooks/useConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,15 @@ function git(_prefix: Path, PATH?: string): Path | undefined {

/// don’t cause macOS to abort and then prompt the user to install the XcodeCLT
//FIXME test! but this is hard to test without docker images or something!
if (host().platform == 'darwin') {
switch (host().platform) {
case 'darwin':
if (new Path("/Library/Developer/CommandLineTools/usr/bin/git").isExecutableFile()) return rv
if (new Path("/Applications/Xcode.app").isDirectory()) return rv
return // don’t use `git`
return // probably won’t work without prompting the user to install the XcodeCLT
case "linux":
return rv
case "windows":
return
}

return rv?.join("bin/git")
Expand Down

0 comments on commit 60238a6

Please sign in to comment.