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 <redacted>
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Taylor Blau <redacted>
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
}