Skip to content

Commit 2f6db37

Browse files
authored
Merge pull request #19448 from gromgit/diagnostic/user_path_prereq
diagnostic: enforce user_path_1 prerequisite
2 parents f5a5324 + 86ec9c7 commit 2f6db37

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Library/Homebrew/diagnostic.rb

+3
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,12 @@ def check_user_path_1
426426
end
427427
end
428428

429+
@user_path_1_done = true
429430
message unless message.empty?
430431
end
431432

432433
def check_user_path_2
434+
check_user_path_1 unless defined?(@user_path_1_done)
433435
return if @seen_prefix_bin
434436

435437
<<~EOS
@@ -440,6 +442,7 @@ def check_user_path_2
440442
end
441443

442444
def check_user_path_3
445+
check_user_path_1 unless defined?(@user_path_1_done)
443446
return if @seen_prefix_sbin
444447

445448
# Don't complain about sbin not being in the path if it doesn't exist

0 commit comments

Comments
 (0)