Fail helpfully if no elements are specified
Instead of charging ahead and failing because we lack dib-run-parts we can fail in this case with a useful error message. Change-Id: Ie10176b5a7019a0385796984ebbaf7742876925a
This commit is contained in:
parent
8986283d41
commit
9bb7ace03c
@ -142,6 +142,11 @@ if [ "$IS_RAMDISK" == "1" ]; then
|
|||||||
source $_LIB/ramdisk-functions
|
source $_LIB/ramdisk-functions
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If no elements are specified theres no way we can succeed
|
||||||
|
if [ -z "$@" ]; then
|
||||||
|
echo "ERROR: At least one distribution root element must be specified"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
arg_to_elements "$@"
|
arg_to_elements "$@"
|
||||||
|
|
||||||
if [ "${#IMAGE_TYPES[@]}" = "1" ]; then
|
if [ "${#IMAGE_TYPES[@]}" = "1" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user