Skip to content

Commit 9f17d61

Browse files
committed
Address PR review feedback
1 parent 8f3584b commit 9f17d61

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

client/Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,20 @@ VERSION := $(shell grep 'Version = ' cmd/root.go | head -1 | sed 's/.*"\(.*\)"/\
44

55
# Use bash as the Make recipe shell (required on Windows where the default
66
# shell cannot execute .sh scripts).
7-
SHELL := bash
7+
# 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+
SHELL := bash
20+
endif
821

922
# Disable CGO to avoid Xcode/C compiler dependency
1023
export CGO_ENABLED = 0

0 commit comments

Comments
 (0)