Skip to content

Commit 5fc6eda

Browse files
sprohaskaspearce
authored andcommitted
git-gui (Windows): Change wrapper to execdir 'libexec/git-core'
git-gui needs bindir in PATH to be able to run 'git'. bindir however is not necessarily in PATH if started directly through a Windows shortcut. Therefore, we used to add the directory git-gui is located in. But with the new 'libexec/git-core' layout this directory is no longer identical to bindir. This commit modifies the wrapper script to discover the bindir and add it to PATH. Signed-off-by: Steffen Prohaska <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent f57ddcc commit 5fc6eda

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

windows/git-gui.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
88
incr argc -2
99
}
1010

11-
set gitguidir [file dirname [info script]]
12-
regsub -all ";" $gitguidir "\\;" gitguidir
13-
set env(PATH) "$gitguidir;$env(PATH)"
14-
unset gitguidir
11+
set bindir [file dirname \
12+
[file dirname \
13+
[file dirname [info script]]]]
14+
set bindir [file join $bindir bin]
15+
regsub -all ";" $bindir "\\;" bindir
16+
set env(PATH) "$bindir;$env(PATH)"
17+
unset bindir
1518
1619
source [file join [file dirname [info script]] git-gui.tcl]

0 commit comments

Comments
 (0)