Skip to content

Commit be3397c

Browse files
authored
Merge pull request #348 from github/lildude/workaround-bug-from-tmp
Switch to TMPDIR when working around OpenSSH bug
2 parents b60bafe + 7bacc2c commit be3397c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

share/github-backup-utils/ghe-ssh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ if [ -z "$GHE_DISABLE_SSH_MUX" ]; then
6161
controlpath="$TMPDIR/.ghe-sshmux-$(echo -n "$user@$host:$port" | git hash-object --stdin | cut -c 1-8)"
6262
opts="-o ControlMaster=auto -o ControlPath=\"$controlpath\" -o ControlPersist=10m -o ServerAliveInterval=10 $opts"
6363
# Workaround for https://bugzilla.mindrot.org/show_bug.cgi?id=1988
64-
[ -S $controlpath ] || ssh -f -p $port $opts -o BatchMode=yes "$host" -- /bin/true 1>/dev/null 2>&1 || true
64+
if ! [ -S $controlpath ]; then
65+
( cd "$TMPDIR" && ssh -f -p $port $opts -o BatchMode=yes "$host" -- /bin/true 1>/dev/null 2>&1 || true )
66+
fi
6567
fi
6668

6769
# Turn on verbose SSH logging if needed

0 commit comments

Comments
 (0)