Test whether filename is empty during pre-create hook
This commit is contained in:
parent
36f646851d
commit
3adec97aa5
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
filename=$(cat /dev/stdin | jq .MetaData.filename)
|
filename=$(cat /dev/stdin | jq .MetaData.filename)
|
||||||
|
if [ -z "$filename" ]; then
|
||||||
if [ -n "$filename" ]; then
|
|
||||||
echo "Error: no filename provided"
|
echo "Error: no filename provided"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue