chore: change exit code in create_conmfig() to 1

This commit is contained in:
Martin Wimpress 2024-05-02 23:55:31 +01:00 committed by Martin Wimpress
parent d73d54a688
commit b2205dfbd8
1 changed files with 3 additions and 3 deletions

View File

@ -367,7 +367,7 @@ function create_config() {
OS="custom"
if ! mkdir "${VM_PATH}" 2>/dev/null; then
echo "ERROR! Could not create directory: ${VM_PATH}. Please verify that it does not already exist"
exit 21
exit 1
fi
if [[ "${INPUT}" == "http://"* ]] || [[ "${INPUT}" == "https://"* ]]; then
INPUT="$(web_redirect "${INPUT}")"
@ -376,7 +376,7 @@ function create_config() {
INPUT="${VM_PATH}/${INPUT##*/}"
else
echo "ERROR! Only ISO,IMG and QCOW2 file types are supported for --create-config"
exit 22
exit 1
fi
fi
if [[ "${INPUT}" == *".iso" ]]; then
@ -390,7 +390,7 @@ function create_config() {
CUSTOM_IMAGE_TYPE="qcow2"
else
echo "ERROR! Only ISO,IMG and QCOW2 file types are supported for --create-config"
exit 23
exit 1
fi
echo "Creating custom VM config for ${INPUT##*/}."
case "${INPUT,,}" in