From 3b1ed035c3e09c245cbb89449fe3a8ebfdfa61a7 Mon Sep 17 00:00:00 2001 From: David Wagner Date: Thu, 28 May 2020 17:38:40 +0200 Subject: 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. --- nixos/maintainers/scripts/ec2/create-amis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos') 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 -- cgit 1.4.1