]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: sanitize 'exec' arguments: convert new 'cygpath' calls
authorJohannes Sixt <j6t@kdbg.org>
Wed, 14 May 2025 19:06:37 +0000 (21:06 +0200)
committerTaylor Blau <me@ttaylorr.com>
Fri, 23 May 2025 21:04:30 +0000 (17:04 -0400)
The side branch merged in the previous commit introduces new 'exec'
calls. Convert these in the same way we did earlier for existing
'exec' calls.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
git-gui.sh

index 0355c0c83650477a108a15940a3e043c01ad9b42..2c446c27845c1686a5b272d6ad8b5c665fb33d00 100755 (executable)
@@ -393,7 +393,7 @@ if {[string match @@* $_shellpath]} {
 }
 
 if {[is_Windows]} {
-       set _shellpath [exec cygpath -m $_shellpath]
+       set _shellpath [safe_exec [list cygpath -m $_shellpath]]
 }
 
 if {![file executable $_shellpath] || \
@@ -2778,7 +2778,7 @@ if {![is_bare]} {
 
 if {[is_Windows]} {
        # Use /git-bash.exe if available
-       set _git_bash [exec cygpath -m /git-bash.exe]
+       set _git_bash [safe_exec [list cygpath -m /git-bash.exe]]
        if {[file executable $_git_bash]} {
                set _bash_cmdline [list "Git Bash" $_git_bash]
        } else {