Skip to content

Commit 3187e9e

Browse files
committed
make sure sshConnection is always set
1 parent 98b56b4 commit 3187e9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/nixos-anywhere.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ if [ -t 0 ]; then # stdin is a tty, we allow interactive input to ssh i.e. passw
2929
else
3030
sshTtyParam="-T"
3131
fi
32+
sshConnection=
3233
postKexecSshPort=22
3334
buildOnRemote=n
3435
envPassword=n
@@ -223,7 +224,7 @@ parseArgs() {
223224
vmTest=y
224225
;;
225226
*)
226-
if [[ -z ${sshConnection-} ]]; then
227+
if [[ -z ${sshConnection} ]]; then
227228
sshConnection="$1"
228229
else
229230
showUsage
@@ -238,7 +239,7 @@ parseArgs() {
238239
nixOptions+=("-L")
239240
fi
240241

241-
if [[ $vmTest == "n" ]] && [[ -z ${sshConnection-} ]]; then
242+
if [[ $vmTest == "n" ]] && [[ -z ${sshConnection} ]]; then
242243
abort "ssh-host must be set"
243244
fi
244245

0 commit comments

Comments
 (0)