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.
This commit is contained in:
@@ -29,7 +29,7 @@ log() {
|
|||||||
echo "$@" >&2
|
echo "$@" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ "$#" -ne 1 ]; then
|
||||||
log "Usage: ./upload-amazon-image.sh IMAGE_OUTPUT"
|
log "Usage: ./upload-amazon-image.sh IMAGE_OUTPUT"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user