diff --git a/Library/brew.sh b/Library/brew.sh index 3e137323c2..03eaa43903 100644 --- a/Library/brew.sh +++ b/Library/brew.sh @@ -209,11 +209,6 @@ EOS esac fi -# Hide shellcheck complaint: -# shellcheck source=/dev/null -source "$HOMEBREW_LIBRARY/Homebrew/utils/ruby.sh" -setup-ruby-path - # Hide shellcheck complaint: # shellcheck source=/dev/null source "$HOMEBREW_LIBRARY/Homebrew/utils/analytics.sh" @@ -243,6 +238,11 @@ then source "$HOMEBREW_BASH_COMMAND" { update-preinstall; "homebrew-$HOMEBREW_COMMAND" "$@"; exit $?; } else + # Hide shellcheck complaint: + # shellcheck source=/dev/null + source "$HOMEBREW_LIBRARY/Homebrew/utils/ruby.sh" + setup-ruby-path + # Unshift command back into argument list (unless argument list was empty). [[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@" { update-preinstall; exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@"; }