diff options
author | David Wagner <wagdav@gmail.com> | 2020-05-28 17:38:40 +0200 |
---|---|---|
committer | David Wagner <wagdav@gmail.com> | 2020-05-28 17:41:45 +0200 |
commit | 3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7 (patch) | |
tree | 248b9af453ef5268477f8422e14da5c36e20b591 /nixos/maintainers | |
parent | 79743fef7ba31f66f156f43aa332c39bae7c5229 (diff) |
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/maintainers')
-rwxr-xr-x | nixos/maintainers/scripts/ec2/create-amis.sh | 2 |
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 145eb49ced7a..89e24f2ccfd9 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 |