git-gui: sanitize 'exec' arguments: convert new 'cygpath' calls

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>

Johannes Sixt committed May 14, 2025 at 21:06 UTC a437f5bc93330a70b42a230e52f3bd036ca1b1da
1 file changed +2 -2
git-gui.sh
+2 -2
@@ -393,7 +393,7 @@ if {[string match @@* $_shellpath]} {
393 }
394
395 if {[is_Windows]} {
396 - set _shellpath [exec cygpath -m $_shellpath]
396 + set _shellpath [safe_exec [list cygpath -m $_shellpath]]
397 }
398
399 if {![file executable $_shellpath] || \
@@ -2778,7 +2778,7 @@ if {![is_bare]} {
2778
2779 if {[is_Windows]} {
2780 # Use /git-bash.exe if available
2781 - set _git_bash [exec cygpath -m /git-bash.exe]
2781 + set _git_bash [safe_exec [list cygpath -m /git-bash.exe]]
2782 if {[file executable $_git_bash]} {
2783 set _bash_cmdline [list "Git Bash" $_git_bash]
2784 } else {