From 00c7aa86e905175476e0dff149d570b48c34c8f1 Mon Sep 17 00:00:00 2001 From: Mark Levedahl Date: Thu, 3 Apr 2025 00:37:08 -0400 Subject: [PATCH] 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 Signed-off-by: Johannes Sixt Signed-off-by: Taylor Blau --- lib/shortcut.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]] -- 2.47.2