From cd824936ce970ebaefe0ed2c22823eac0eb5306a Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Tue, 26 Apr 2022 15:31:22 -0400 Subject: [PATCH] .github/workflows/cycles.yml: fix git command detection --- .github/workflows/cycles.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml index 72c8d83b2c..d57976cbee 100644 --- a/.github/workflows/cycles.yml +++ b/.github/workflows/cycles.yml @@ -28,7 +28,13 @@ jobs: common/travis/prepare.sh - name: Find cycles and open issues run: | - git config --global --add safe.directory "$PWD" + if command -v chroot-git >/dev/null 2>&1; then + GIT_CMD=$(command -v chroot-git) + elif command -v git >/dev/null 2>&1; then + GIT_CMD=$(command -v git) + fi + # required by git 2.35.2+ + $GIT_CMD config --global --add safe.directory "$PWD" common/scripts/xbps-cycles.py | tee cycles grep 'Cycle:' cycles | while read -r line; do if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then