fix(crow): probe the auto-patch branch with git ls-remote to avoid a scary fatal
The no-op path worked (the else branch runs and exits 0), but using `git fetch` as the existence check printed `fatal: couldn't find remote ref ...` to stderr when the branch is absent -- which reads as a failure even though the step succeeds. Probe with `git ls-remote --exit-code --heads` instead, which is silent and sets a clean exit code; only fetch/checkout when the branch exists.
This commit is contained in:
parent
13fcad6dc4
commit
c10ffe2f75
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ steps:
|
|||
# clone.
|
||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||
- git fetch -q origin main
|
||||
- 'if git fetch -q origin ${patch_branch}; then git checkout -q FETCH_HEAD; else echo "No ${patch_branch} branch; no pending auto-patch proposals to verify."; exit 0; fi'
|
||||
- 'if git ls-remote --exit-code --heads origin ${patch_branch} >/dev/null 2>&1; then git fetch -q origin ${patch_branch} && git checkout -q FETCH_HEAD; else echo "No ${patch_branch} branch; no pending auto-patch proposals to verify."; exit 0; fi'
|
||||
- mkdir -p /mnt/cache/R-pkgs
|
||||
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||
|
|
|
|||
Loading…
Reference in a new issue