Skip to content

Commit da32f37

Browse files
committed
Avoid hardcoding Brew's prefix
1 parent 476f3ae commit da32f37

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/scripts/install_deps.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ case "${1%%-*}" in
1313
# However, CMake automatically uses Homebrew's `gmake`, so our CI has synced output.
1414
brew install bison md5sha1sum make
1515
# Export `bison` to allow using the version we install from Homebrew,
16-
# instead of the outdated one preinstalled on macOS (which doesn't even support `-Wall`...)
17-
# This path ↓ is used on Intel macOS, and this one ↓ on ARM ones.
18-
export PATH="/usr/local/opt/bison/bin:/opt/homebrew/opt/bison/bin:$PATH"
19-
printf 'PATH=%s\n' "$PATH" >>"$GITHUB_ENV" # Make it available to later CI steps too
16+
# instead of the outdated one preinstalled on macOS (which doesn't even support `-Wall`...).
17+
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
18+
printf 'PATH=%s\n' "$PATH" >>"$GITHUB_ENV" # Make it available to later CI steps too.
2019
;;
2120
freebsd)
2221
pkg install -y bash bison cmake git png

0 commit comments

Comments
 (0)