fix(docker-build): improve argument handling and error messaging for usage option

This commit is contained in:
hkfires
2026-04-16 09:19:03 +08:00
parent ba454dbfbf
commit 1267fddf61

View File

@@ -109,10 +109,19 @@ wait_for_service() {
sleep 2 sleep 2
} }
if [[ "${1:-}" == "--with-usage" ]]; then case "${1:-}" in
WITH_USAGE=true "")
export_stats_api_secret ;;
fi "--with-usage")
WITH_USAGE=true
export_stats_api_secret
;;
*)
echo "Error: unknown option '${1}'. Did you mean '--with-usage'?"
echo "Usage: ./docker-build.sh [--with-usage]"
exit 1
;;
esac
# --- Step 1: Choose Environment --- # --- Step 1: Choose Environment ---
echo "Please select an option:" echo "Please select an option:"