Skip to content

Commit 72b6eeb

Browse files
dschogitster
authored andcommitted
cmake: do find Git for Windows' shell interpreter
By default, Git for Windows does not install its `sh.exe` into the `PATH`. However, our current `CMakeLists.txt` expects to find a shell interpreter in the `PATH`. So let's fall back to looking in the default location where Git for Windows _does_ install a relatively convenient `sh.exe`: `C:\Program Files\Git\bin\sh.exe` Helped-by: Øystein Walle <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3eccc7b commit 72b6eeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cmake_minimum_required(VERSION 3.14)
4141
#set the source directory to root of git
4242
set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
4343

44-
find_program(SH_EXE sh)
44+
find_program(SH_EXE sh PATHS "C:/Program Files/Git/bin")
4545
if(NOT SH_EXE)
4646
message(FATAL_ERROR "sh: shell interpreter was not found in your path, please install one."
4747
"On Windows, you can get it as part of 'Git for Windows' install at https://gitforwindows.org/")

0 commit comments

Comments
 (0)