summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorDavid Wagner <wagdav@gmail.com>2020-05-28 17:38:40 +0200
committerDavid Wagner <wagdav@gmail.com>2020-05-28 17:41:45 +0200
commit3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7 (patch)
tree248b9af453ef5268477f8422e14da5c36e20b591 /nixos
parent79743fef7ba31f66f156f43aa332c39bae7c5229 (diff)
downloadnixpkgs-3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7.tar
nixpkgs-3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7.tar.gz
nixpkgs-3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7.tar.bz2
nixpkgs-3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7.tar.lz
nixpkgs-3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7.tar.xz
nixpkgs-3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7.tar.zst
nixpkgs-3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7.zip
create-amis: fix argument check
Because this script enables `set -u` when no arguments are provided bash
exits with the error:

    $1: unbound variable

instead of the helpful usage message.
Diffstat (limited to 'nixos')
-rwxr-xr-xnixos/maintainers/scripts/ec2/create-amis.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/maintainers/scripts/ec2/create-amis.sh b/nixos/maintainers/scripts/ec2/create-amis.sh
index 145eb49ced7..89e24f2ccfd 100755
--- a/nixos/maintainers/scripts/ec2/create-amis.sh
+++ b/nixos/maintainers/scripts/ec2/create-amis.sh
@@ -29,7 +29,7 @@ log() {
     echo "$@" >&2
 }
 
-if [ -z "$1" ]; then
+if [ "$#" -ne 1 ]; then
     log "Usage: ./upload-amazon-image.sh IMAGE_OUTPUT"
     exit 1
 fi