We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f3584b commit 9f17d61Copy full SHA for 9f17d61
1 file changed
client/Makefile
@@ -4,7 +4,20 @@ VERSION := $(shell grep 'Version = ' cmd/root.go | head -1 | sed 's/.*"\(.*\)"/\
4
5
# Use bash as the Make recipe shell (required on Windows where the default
6
# shell cannot execute .sh scripts).
7
-SHELL := bash
+# On Windows, "bash" can resolve to C:\Windows\System32\bash.exe (WSL launcher)
8
+# instead of Git Bash. Prefer Git Bash when available.
9
+ifeq ($(OS),Windows_NT)
10
+ GIT_BASH := $(firstword $(wildcard $(ProgramW6432)/Git/bin/bash.exe) \
11
+ $(wildcard $(ProgramFiles)/Git/bin/bash.exe) \
12
+ $(wildcard $(PROGRAMFILES)/Git/bin/bash.exe))
13
+ ifdef GIT_BASH
14
+ SHELL := $(GIT_BASH)
15
+ else
16
+ SHELL := bash
17
+ endif
18
+else
19
20
+endif
21
22
# Disable CGO to avoid Xcode/C compiler dependency
23
export CGO_ENABLED = 0
0 commit comments