From: Mark Levedahl Date: Thu, 3 Apr 2025 14:26:21 +0000 (-0400) Subject: git-gui: _which, only add .exe suffix if not present X-Git-Tag: v2.43.7~4^2~1^2~11 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=37b9230226db2a3a81df2e92a44ea655076cd0c4;p=thirdparty%2Fgit.git git-gui: _which, only add .exe suffix if not present The _which function finds executables on $PATH, and adds .exe on Windows unless -script was given. However, win32.tcl executes "wscript.exe" and "cscript.exe", both of which fail as _which adds .exe to both. This is already fixed in git-gui released by Git for Windows. Do so here. Signed-off-by: Mark Levedahl Signed-off-by: Johannes Sixt Signed-off-by: Taylor Blau --- diff --git a/git-gui.sh b/git-gui.sh index 3e5907a460..2e079b6ab1 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -101,6 +101,9 @@ proc _which {what args} { if {[is_Windows] && [lsearch -exact $args -script] >= 0} { set suffix {} + } elseif {[is_Windows] && [string match *$_search_exe [string tolower $what]]} { + # The search string already has the file extension + set suffix {} } else { set suffix $_search_exe }