Test whether filename is empty during pre-create hook

This commit is contained in:
Marius 2017-01-24 09:48:10 +01:00
parent 36f646851d
commit 3adec97aa5
1 changed files with 1 additions and 2 deletions

View File

@ -1,8 +1,7 @@
#!/bin/bash
filename=$(cat /dev/stdin | jq .MetaData.filename)
if [ -n "$filename" ]; then
if [ -z "$filename" ]; then
echo "Error: no filename provided"
exit 1
fi