Skip to content

Commit 0926305

Browse files
committed
Fix macos issue given different homebrew install locations across different MacOS versions. Add debugging to macos install step to help resolve the issue if I'm wrong.
1 parent 4061f15 commit 0926305

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

Diff for: action.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,25 @@ runs:
8383
brew tap coverallsapp/coveralls --quiet
8484
brew install coveralls --quiet
8585
86-
# Check if the binary exists in the expected location
87-
if [ ! -f /usr/local/bin/coveralls ]; then
86+
# Debugging output to see where Homebrew installs coveralls
87+
echo "Homebrew bin directory:"
88+
echo $(brew --prefix)/bin
89+
90+
# List files in the Homebrew bin directory
91+
echo "Listing files in $(brew --prefix)/bin:"
92+
ls -la $(brew --prefix)/bin
93+
94+
# Check if the binary exists in the possible locations
95+
if [ -f /usr/local/bin/coveralls ]; then
96+
echo "/usr/local/bin" >> $GITHUB_PATH
97+
elif [ -f /opt/homebrew/bin/coveralls ]; then
98+
echo "/opt/homebrew/bin" >> $GITHUB_PATH
99+
else
88100
echo "Coveralls binary not found after installation (MacOS)."
89101
exit 1
90102
fi
91103
92-
- name: Report coverage-reporter-version information for macOS
104+
- name: Report coverage-reporter-version exception for macOS
93105
if: ${{ runner.os == 'macOS' && inputs.coverage-reporter-version != 'latest' }}
94106
shell: bash
95107
run: |

0 commit comments

Comments
 (0)