Move check for both flags set down

Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
This commit is contained in:
darkexplosiveqwx
2025-05-11 15:30:54 +02:00
parent 13d5dea35f
commit 24387ea13a

12
padd.sh
View File

@@ -105,12 +105,6 @@ TestAPIAvailability() {
local chaos_api_list authResponse cmdResult digReturnCode authStatus authData apiAvailable
if [ -n "$API_LOCATION" ] && [ -n "$SERVER" ]; then
moveXOffset; echo "Do not set --server and --api simultaneously."
moveXOffset; echo "Exiting."
exit 1
fi
# Check if an API location was specified with --api
if [ -n "${API_LOCATION}" ]; then
# The list of available API URLs is just the provided URL
@@ -1942,6 +1936,12 @@ while [ "$#" -gt 0 ]; do
shift
done
if [ -n "$API_LOCATION" ] && [ -n "$SERVER" ]; then
moveXOffset; echo "Do not set --server and --api simultaneously."
moveXOffset; echo "Exiting."
exit 1
fi
if [ "${versionOnly}" ]; then
ShowVersion
fi