Skip to content

Reinstall buck2 arm64 binary on MacOS if the wrong version (x86) is installed #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .ci/scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,20 @@ install_buck() {
brew install wget
fi

BUCK2_NOT_AVAILABLE=false
if ! command -v buck2 &> /dev/null; then
BUCK2_NOT_AVAILABLE=true
else
BUCK2_BINARY=$(which buck2)
BUCK2_ARCH=$(file -b "${BUCK2_BINARY}")

if [[ "${BUCK2_ARCH}" != "Mach-O 64-bit executable arm64" ]]; then
echo "Reinstall buck2 because ${BUCK2_BINARY} is ${BUCK2_ARCH}, not 64-bit arm64"
BUCK2_NOT_AVAILABLE=true
fi
fi

if [[ "${BUCK2_NOT_AVAILABLE}" == true ]]; then
pushd .ci/docker

BUCK2=buck2-aarch64-apple-darwin.zst
Expand Down