aboutsummaryrefslogtreecommitdiffstats
path: root/git-gui/lib/sshkey.tcl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-06-15 21:52:28 -0700
committerJunio C Hamano <gitster@pobox.com>2025-06-15 21:54:23 -0700
commite1775c06465436437f2db0d3b6f59a61cfde0f2d (patch)
treeee5fb0758ceb486902d80df4edb6d63ee5f3e53e /git-gui/lib/sshkey.tcl
parentGit 2.50 (diff)
parentGit 2.49.1 (diff)
downloadgit-e1775c06465436437f2db0d3b6f59a61cfde0f2d.tar.gz
git-e1775c06465436437f2db0d3b6f59a61cfde0f2d.zip
Sync with 2.49.1
Diffstat (limited to 'git-gui/lib/sshkey.tcl')
-rw-r--r--git-gui/lib/sshkey.tcl7
1 files changed, 4 insertions, 3 deletions
diff --git a/git-gui/lib/sshkey.tcl b/git-gui/lib/sshkey.tcl
index 589ff8f78a..c3e681b899 100644
--- a/git-gui/lib/sshkey.tcl
+++ b/git-gui/lib/sshkey.tcl
@@ -7,7 +7,7 @@ proc find_ssh_key {} {
~/.ssh/id_rsa.pub ~/.ssh/identity.pub
} {
if {[file exists $name]} {
- set fh [open $name r]
+ set fh [safe_open_file $name r]
set cont [read $fh]
close $fh
return [list $name $cont]
@@ -83,9 +83,10 @@ proc make_ssh_key {w} {
set sshkey_title [mc "Generating..."]
$w.header.gen configure -state disabled
- set cmdline [list sh -c {echo | ssh-keygen -q -t rsa -f ~/.ssh/id_rsa 2>&1}]
+ set cmdline [list [shellpath] -c \
+ {echo | ssh-keygen -q -t rsa -f ~/.ssh/id_rsa 2>&1}]
- if {[catch { set sshkey_fd [_open_stdout_stderr $cmdline] } err]} {
+ if {[catch { set sshkey_fd [safe_open_command $cmdline] } err]} {
error_popup [mc "Could not start ssh-keygen:\n\n%s" $err]
return
}