Skip to content

Commit

Permalink
brew: fix get-installer error on fresh macos
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Sep 1, 2023
1 parent 7eb40be commit ec38cb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions commands/brew
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function brew() (
# get the homebrew binary
local bin="${HOMEBREW_PREFIX-}/bin/brew"
if test ! -x "$bin"; then
echo-style --error='Homebrew is not installed.' ' ' --notice="Install it with:" ' ' --code="$(get-installer -- brew)" >/dev/stderr
echo-style --error='Homebrew is not installed.' ' ' --notice="Install it with:" ' ' --code='setup-mac-brew' >/dev/stderr
# ^ don't use get-installer, as bash v5 may not exist yet
return 74 # EPROGUNAVAIL 74 RPC prog. not avail
fi

Expand All @@ -32,7 +33,7 @@ function brew() (
Dorothy extends the [brew] command to:
- enforce the correct prefix via [HOMEBREW_PREFIX = $HOMEBREW_PREFIX]
- enforce the appropriate architecture via [HOMEBREW_ARCH = $HOMEBREW_ARCH]
- disable auto updates, as Dorothy handles that better via [$(get-installer -- brew)]
- disable auto updates, as Dorothy handles that better via [setup-mac-brew]
- disable brew environment hints, as Dorothy handles that better via [setup-environment-commands]
EOF
return 22 # EINVAL 22 Invalid argument
Expand Down

0 comments on commit ec38cb1

Please sign in to comment.