Add check for get_packages argument

Add a quick check so we don't reintroduce bad arguments as in
Ie1b8d09369281059d21da61b2725a457f708ae9e

Change-Id: Ibebc71791f2743eef64d6f7c2596d54a73ea92aa
This commit is contained in:
Ian Wienand 2015-11-09 15:04:32 +11:00
parent a5e4c0f279
commit 7d515b5db8

View File

@ -1075,6 +1075,10 @@ function get_packages {
local file_to_parse=""
local service=""
if [ $# -ne 1 ]; then
die $LINENO "get_packages takes a single, comma-separated argument"
fi
if [[ -z "$package_dir" ]]; then
echo "No package directory supplied"
return 1