Skip to content

Commit 6fed45c

Browse files
committed
build order and brew activation
1 parent 51e60a5 commit 6fed45c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

lib/packages_setup.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ fmt_header "Package Manager"
88

99
case "$OS" in
1010
macos)
11+
# Activate Homebrew for this session if it exists but isn't on PATH yet.
12+
# This covers re-runs in the same terminal before the shell RC is sourced.
13+
if ! cmd_exists brew; then
14+
if [ -f /opt/homebrew/bin/brew ]; then
15+
eval "$(/opt/homebrew/bin/brew shellenv)"
16+
elif [ -f /usr/local/bin/brew ]; then
17+
eval "$(/usr/local/bin/brew shellenv)"
18+
fi
19+
fi
20+
1121
if cmd_exists brew; then
1222
fmt_ok "Homebrew already installed"
1323
else

setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ source "$SCRIPT_DIR/lib/packages_setup.sh"
128128
# shellcheck source=lib/git_setup.sh
129129
source "$SCRIPT_DIR/lib/git_setup.sh"
130130

131+
# shellcheck source=lib/build_setup.sh
132+
source "$SCRIPT_DIR/lib/build_setup.sh"
133+
131134
# shellcheck source=lib/mise_setup.sh
132135
source "$SCRIPT_DIR/lib/mise_setup.sh"
133136

@@ -137,9 +140,6 @@ source "$SCRIPT_DIR/lib/1password_setup.sh"
137140
# shellcheck source=lib/circleci_setup.sh
138141
source "$SCRIPT_DIR/lib/circleci_setup.sh"
139142

140-
# shellcheck source=lib/build_setup.sh
141-
source "$SCRIPT_DIR/lib/build_setup.sh"
142-
143143
# shellcheck source=lib/docker_setup.sh
144144
source "$SCRIPT_DIR/lib/docker_setup.sh"
145145

0 commit comments

Comments
 (0)