Git GUI: fix Repository>Explore Working Copy (#4357)

This is a companion PR of https://github.com/prati0100/git-gui/pull/95

Since Git v2.39.1, we are a bit more stringent in searching the PATH. In
particular, we specifically require the `.exe` suffix.

However, the `Repository>Explore Working Copy` command asks for
`explorer.exe` to be found on the `PATH`, which _already_ has that
suffix.

Let's unstartle the PATH-finding logic about this scenario.

This fixes https://github.com/git-for-windows/git/issues/4356
This commit is contained in:
Johannes Schindelin 2023-03-21 22:37:30 +01:00
commit 25aca7dc5c

View File

@ -101,6 +101,9 @@ proc _which {what args} {
if {[is_Windows] && [lsearch -exact $args -script] >= 0} {
set suffix {}
} elseif {[string match *$_search_exe $what]} {
# The search string already has the file extension
set suffix {}
} else {
set suffix $_search_exe
}