Skip to content

Commit 37b9230

Browse files
mark987ttaylorr
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent dcda716 commit 37b9230

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git-gui.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ proc _which {what args} {
101101
102102
if {[is_Windows] && [lsearch -exact $args -script] >= 0} {
103103
set suffix {}
104+
} elseif {[is_Windows] && [string match *$_search_exe [string tolower $what]]} {
105+
# The search string already has the file extension
106+
set suffix {}
104107
} else {
105108
set suffix $_search_exe
106109
}

0 commit comments

Comments
 (0)