aboutsummaryrefslogtreecommitdiffstats
path: root/lib/shortcut.tcl
diff options
context:
space:
mode:
authorMark Levedahl <mlevedahl@gmail.com>2025-04-13 14:45:04 -0400
committerMark Levedahl <mlevedahl@gmail.com>2025-07-22 10:21:44 -0400
commit158800ac9c792b875b2cd138a1ecbfb14fa6a71a (patch)
tree05aa38b6e01125d6cea42bf3bf93160de9b57307 /lib/shortcut.tcl
parentgit-gui: Windows tk_getSaveFile is not useful for shortcuts (diff)
downloadgit-158800ac9c792b875b2cd138a1ecbfb14fa6a71a.tar.gz
git-158800ac9c792b875b2cd138a1ecbfb14fa6a71a.zip
git-gui: use /cmd/git-gui.exe for shortcut
git-gui on Windows creates a shortcut that presumes the git-gui script will run on the basic Windows environment as configured. But, Git for Windows uses wrapper scripts to launch executables, assuring the environment is correct (see [1] for details). The launcher for git-gui is /cmd/git-gui.exe, is not on PATH, and is not detected or used by the current shortcut code. Let's look for this before trying the existing approaches. [1] https://gitforwindows.org/git-wrapper.html Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Diffstat (limited to '')
-rw-r--r--lib/shortcut.tcl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/shortcut.tcl b/lib/shortcut.tcl
index feaccbdd1d..431665059e 100644
--- a/lib/shortcut.tcl
+++ b/lib/shortcut.tcl
@@ -23,7 +23,10 @@ proc do_windows_shortcut {} {
# Use git-gui.exe if found, fall back to wish + launcher
set link_arguments {}
- set link_target [_which git-gui]
+ set link_target [safe_exec [list cygpath -m /cmd/git-gui.exe]]
+ if {![file executable $link_target]} {
+ set link_target [_which git-gui]
+ }
if {![file executable $link_target]} {
set link_target [file normalize [info nameofexecutable]]
set link_arguments [file normalize $::argv0]