Skip to content

Commit

Permalink
workflows: install svn when brew fetch needs it
Browse files Browse the repository at this point in the history
  • Loading branch information
Moisan committed Dec 20, 2024
1 parent 477d91c commit 0b5e527
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,19 @@ jobs:
- name: Check formula for missing sources.
id: fetch
if: always() && steps.archived.conclusion != 'failure'
run: brew fetch --build-from-source "$FORMULA"
run: |
FETCH_OUTPUT=$(brew fetch --build-from-source "$FORMULA" 2>&1 || true)
FETCH_EXIT_CODE=$?
echo "$FETCH_OUTPUT"
if echo "$FETCH_OUTPUT" | grep -q "You must: brew install svn"; then
echo "SVN required. Installing..."
brew install svn
echo "Retrying fetch..."
brew fetch --build-from-source "$FORMULA"
elif [ $FETCH_EXIT_CODE -ne 0 ]; then
exit $FETCH_EXIT_CODE
fi
- name: Report fetch issues
if: failure() && steps.fetch.conclusion == 'failure'
Expand Down

0 comments on commit 0b5e527

Please sign in to comment.