diff options
| author | Mark Levedahl <mlevedahl@gmail.com> | 2025-04-02 17:37:27 -0400 |
|---|---|---|
| committer | Taylor Blau <me@ttaylorr.com> | 2025-05-23 17:04:23 -0400 |
| commit | 411cd493cb9998c2ba1c17dd98c3d3d4b121a1dd (patch) | |
| tree | 7e842480746fc117a6bfe7e74a5784a5edd18036 /git-gui.sh | |
| parent | 2c66188b123795e4083594ee682dcf012540bee2 (diff) | |
| download | git-411cd493cb9998c2ba1c17dd98c3d3d4b121a1dd.tar.gz | |
git-gui: avoid auto_execok for git-bash menu item
On Windows, git-gui offers to open a git-bash session for the current
repository from the menu, but uses [auto_execok start] to get the
command to actually run that shell.
The code for auto_execok, in /usr/share/tcl8.6/tcl.init, has 'start' in
the 'shellBuiltins' list for cmd.exe on Windows: as a result,
auto_execok does not actually search for start, meaning this usage is
technically ok with auto_execok now. However, leaving this use of
auto_execok in place will just induce confusion about why a known unsafe
function is being used on Windows. Instead, let's switch to using our
known safe _which function that looks only in $PATH, excluding the
current working directory.
Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'git-gui.sh')
| -rwxr-xr-x | git-gui.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-gui.sh b/git-gui.sh index 72da2443e5..3bfe4364c7 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2769,7 +2769,7 @@ if {[is_Windows]} { } .mbar.repository add command \ -label [mc "Git Bash"] \ - -command {eval exec [auto_execok start] $cmdLine} + -command {eval exec [list [_which cmd] /c start] $cmdLine} } if {[is_Windows] || ![is_bare]} { |
