diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c6d5ffcc..8bdadff51 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,6 +27,12 @@ jobs: STRAP_CI: 1 STRAP_DEBUG: 1 + - name: Rerun bin/strap.sh + run: bin/strap.sh + env: + STRAP_CI: 1 + STRAP_DEBUG: 1 + - run: brew config - run: brew doctor diff --git a/bin/strap.sh b/bin/strap.sh index dcb032b92..5e7c3a510 100755 --- a/bin/strap.sh +++ b/bin/strap.sh @@ -273,7 +273,8 @@ logk # Setup Homebrew directory and permissions. logn "Installing Homebrew:" HOMEBREW_PREFIX="$(brew --prefix 2>/dev/null || true)" -if [ -z "$HOMEBREW_PREFIX" ]; then +HOMEBREW_REPOSITORY="$(brew --repository 2>/dev/null || true)" +if [ -z "$HOMEBREW_PREFIX" ] || [ -z "$HOMEBREW_REPOSITORY" ]; then UNAME_MACHINE="$(/usr/bin/uname -m)" if [[ "$UNAME_MACHINE" == "arm64" ]]; then HOMEBREW_PREFIX="/opt/homebrew"