Skip to content

Commit

Permalink
Merge pull request #416 from MikeMcQuaid/strap-repository
Browse files Browse the repository at this point in the history
strap.sh: handle rerunning Strap.
  • Loading branch information
MikeMcQuaid committed Mar 6, 2021
2 parents eb60444 + 95fc62b commit 83858f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion bin/strap.sh
Expand Up @@ -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"
Expand Down

0 comments on commit 83858f2

Please sign in to comment.