Skip to content

Commit e729c95

Browse files
committed
install.sh: move PATH warning after update
Otherwise, it'll get lost in the voluminous `brew update` output. Also fix the string spacing, to maintain a consistent two-space overflow indent with other multiline messages.
1 parent 228188f commit e729c95

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

install.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,12 +1027,16 @@ ohai "Downloading and installing Homebrew..."
10271027
execute_sudo "${CHMOD[@]}" "a+r" /etc/paths.d/homebrew
10281028
elif [[ ":${PATH}:" != *":${HOMEBREW_PREFIX}/bin:"* ]]
10291029
then
1030-
warn "${HOMEBREW_PREFIX}/bin is not in your PATH.
1031-
Instructions on how to configure your shell for Homebrew
1032-
can be found in the 'Next steps' section below."
1030+
PATH_WARN=1
10331031
fi
10341032

10351033
execute "${HOMEBREW_PREFIX}/bin/brew" "update" "--force" "--quiet"
1034+
1035+
if [[ -n "${PATH_WARN-}" ]]; then
1036+
warn "${HOMEBREW_PREFIX}/bin is not in your PATH.
1037+
Instructions on how to configure your shell for Homebrew
1038+
can be found in the 'Next steps' section below."
1039+
fi
10361040
) || exit 1
10371041

10381042
ohai "Installation successful!"

0 commit comments

Comments
 (0)