File tree Expand file tree Collapse file tree
share/github-backup-utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ port=$(ssh_port_part "$host")
2424hostname=$( ssh_host_part " $host " )
2525
2626set +e
27- output=$( echo " cat \" $GHE_REMOTE_METADATA_FILE \" 2>/dev/null || exit 101" | ghe-ssh $options $host -- /bin/sh 2>&1 )
27+ output=$( echo " cat \" $GHE_REMOTE_METADATA_FILE \" 2>/dev/null || exit 101" | ghe-ssh -o ' BatchMode no ' $options $host -- /bin/sh 2>&1 )
2828rc=$?
2929set -e
3030
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ set -e
1010cd $( dirname " $0 " ) /../..
1111. share/github-backup-utils/ghe-backup-config
1212
13- opts=$GHE_EXTRA_SSH_OPTS
13+ eval opts=( $GHE_EXTRA_SSH_OPTS )
1414while true ; do
1515 case " $1 " in
1616 -p|-l|-o)
17- opts=" $ opts $1 $2 "
17+ opts=( " ${ opts[@]} " $1 " $2 " )
1818 shift 2
1919 ;;
2020 --)
@@ -42,12 +42,12 @@ port=$(ssh_port_part "$host")
4242host=$( ssh_host_part " $host " )
4343
4444# Add port / -p option when non-standard port given.
45- [ " $port " != " 22" ] && opts=" -p $port $ opts"
45+ [ " $port " != " 22" ] && opts=( -p $port " ${ opts[@]} " )
4646
4747# Add user / -l option
4848user=" ${host%@* } "
4949[ " $user " = " $host " ] && user=" admin"
50- opts=" -l $user $ opts"
50+ opts=( -l " $user " " ${ opts[@]} " )
5151
5252# Bail out with error if the simple command form is used with complex commands.
5353# Complex
6161$GHE_VERBOSE_SSH && set -x
6262
6363# Exec ssh command with modified host / port args and add nice to command.
64- exec ssh $ opts " $host " -- $GHE_NICE $GHE_IONICE " $@ "
64+ exec ssh " ${ opts[@]} " -o ' BatchMode yes ' " $host " -- $GHE_NICE $GHE_IONICE " $@ "
You can’t perform that action at this time.
0 commit comments