aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Levedahl <mlevedahl@gmail.com>2025-04-03 00:37:08 -0400
committerTaylor Blau <me@ttaylorr.com>2025-05-23 17:04:23 -0400
commit00c7aa86e905175476e0dff149d570b48c34c8f1 (patch)
tree9454ee9d633fa9e243e83f5b10a718134bfd2c6e
parentgit-gui: avoid auto_execok for git-bash menu item (diff)
downloadgit-00c7aa86e905175476e0dff149d570b48c34c8f1.tar.gz
git-00c7aa86e905175476e0dff149d570b48c34c8f1.zip
git-gui: avoid auto_execok in do_windows_shortcut
git-gui on Windows uses auto_execok to locate git-gui.exe, which performs the same flawed search as does the builtin exec. Use _which instead, performing a safe PATH lookup. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Taylor Blau <me@ttaylorr.com>
-rw-r--r--lib/shortcut.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/shortcut.tcl b/lib/shortcut.tcl
index 674a41f5e0..263f4899c9 100644
--- a/lib/shortcut.tcl
+++ b/lib/shortcut.tcl
@@ -12,7 +12,7 @@ proc do_windows_shortcut {} {
set fn ${fn}.lnk
}
# Use git-gui.exe if available (ie: git-for-windows)
- set cmdLine [auto_execok git-gui.exe]
+ set cmdLine [list [_which git-gui]]
if {$cmdLine eq {}} {
set cmdLine [list [info nameofexecutable] \
[file normalize $::argv0]]