Merge pull request #19448 from gromgit/diagnostic/user_path_prereq

diagnostic: enforce user_path_1 prerequisite
This commit is contained in:
Mike McQuaid 2025-03-10 08:55:50 +00:00 committed by GitHub
commit 2f6db3757e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -426,10 +426,12 @@ module Homebrew
end end
end end
@user_path_1_done = true
message unless message.empty? message unless message.empty?
end end
def check_user_path_2 def check_user_path_2
check_user_path_1 unless defined?(@user_path_1_done)
return if @seen_prefix_bin return if @seen_prefix_bin
<<~EOS <<~EOS
@ -440,6 +442,7 @@ module Homebrew
end end
def check_user_path_3 def check_user_path_3
check_user_path_1 unless defined?(@user_path_1_done)
return if @seen_prefix_sbin return if @seen_prefix_sbin
# Don't complain about sbin not being in the path if it doesn't exist # Don't complain about sbin not being in the path if it doesn't exist