From 48174c9ad280e43e1ce67cc8f2becb15e2f1c148 Mon Sep 17 00:00:00 2001 From: Cheney <970320820@qq.com> Date: Wed, 13 May 2026 09:27:44 +0800 Subject: [PATCH] fix(cli): match 'push' anywhere in git args, not just $1 The script calls `git -C /path push ...` so the first arg is `-C`, not `push`. Use glob match on full args instead. --- scripts/tests/publish-cli-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/tests/publish-cli-test.sh b/scripts/tests/publish-cli-test.sh index 1a94669f..f0a79f04 100755 --- a/scripts/tests/publish-cli-test.sh +++ b/scripts/tests/publish-cli-test.sh @@ -258,7 +258,7 @@ init_repo "$REPO8" "0.6.0" mkdir -p "$REPO8/bin-git" cat >"$REPO8/bin-git/git" <<'WRAPPER' #!/usr/bin/env bash -if [[ "${1:-}" == "push" ]]; then +if [[ "$*" == *"push"* ]]; then echo "fatal: could not read from remote repository." >&2 exit 128 fi @@ -317,7 +317,7 @@ init_repo "$REPO10" "0.8.0" mkdir -p "$REPO10/bin-git" cat >"$REPO10/bin-git/git" <<'WRAPPER' #!/usr/bin/env bash -if [[ "${1:-}" == "push" ]]; then +if [[ "$*" == *"push"* ]]; then echo "GIT_PUSH_ARGS: $*" >> "$REPO_ROOT/git-push-log.txt" fi exec /usr/bin/git "$@"