diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index d23caf945..59e515d0e 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -73,8 +73,6 @@ elif hash pacman &> /dev/null; then elif hash pkg &> /dev/null; then source "$vmsetupdir/pkgdep/pkg" else - echo "Supported package manager not found. Script supports:" - printf ' * %s\n' "${managers[@]##*/}" package_manager="undefined" fi @@ -110,6 +108,12 @@ while getopts 'd:siuht:c:-:' optchar; do esac done +if [[ "$package_manager" == "undefined" ]]; then + echo "Supported package manager not found. Script supports:" + printf ' * %s\n' "${managers[@]##*/}" + exit 1 +fi + if [ -n "$CONF_PATH" ]; then if [ ! -f "$CONF_PATH" ]; then echo Configuration file does not exist: "$CONF_PATH"