mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-05-06 20:20:27 +08:00
fix(docker-build): improve argument handling and error messaging for usage option
This commit is contained in:
@@ -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:"
|
||||||
|
|||||||
Reference in New Issue
Block a user