diagnostic: enforce user_path_1 prerequisite

Resolves #19447.
This commit is contained in:
Adrian Ho 2025-03-10 10:01:38 +08:00
parent 9c11f1b637
commit 86ec9c7c93

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