From 5951bd1d3535e425188480e7ca3de4d0a3a42462 Mon Sep 17 00:00:00 2001 From: shenmo <47873776+shenmo7192@users.noreply.github.com> Date: Sun, 29 Mar 2026 01:54:10 +0800 Subject: [PATCH] Ban apm debug --- extras/shell-caller.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extras/shell-caller.sh b/extras/shell-caller.sh index d4c3b561..5888aa6c 100755 --- a/extras/shell-caller.sh +++ b/extras/shell-caller.sh @@ -54,6 +54,12 @@ command_type="$1" # 3. 根据指令类型分发逻辑 case "$command_type" in "apm") + # 禁止 apm debug 命令 + if [[ "$2" == "debug" ]]; then + echo "错误:apm debug 命令已被禁止执行。" + echo "提示:如需调试,请使用其他方式。" + exit 1 + fi # 执行 apm 命令(跳过第一个参数) /usr/bin/apm "${@:2}" 2>&1 exit_code=$? @@ -153,4 +159,4 @@ case "$command_type" in ;; esac -exit $exit_code \ No newline at end of file +exit $exit_code