mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-27 11:14:59 +00:00
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.
This commit is contained in:
parent
dad06b465d
commit
48174c9ad2
1 changed files with 2 additions and 2 deletions
|
|
@ -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 "$@"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue