Skip to content

Commit 158800a

Browse files
committed
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 <[email protected]>
1 parent 3c8e1fe commit 158800a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/shortcut.tcl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ proc do_windows_shortcut {} {
2323

2424
# Use git-gui.exe if found, fall back to wish + launcher
2525
set link_arguments {}
26-
set link_target [_which git-gui]
26+
set link_target [safe_exec [list cygpath -m /cmd/git-gui.exe]]
27+
if {![file executable $link_target]} {
28+
set link_target [_which git-gui]
29+
}
2730
if {![file executable $link_target]} {
2831
set link_target [file normalize [info nameofexecutable]]
2932
set link_arguments [file normalize $::argv0]

0 commit comments

Comments
 (0)