aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/diagnostic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/diagnostic.rb')
-rw-r--r--Library/Homebrew/diagnostic.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb
index 7657af193..1022e5d1d 100644
--- a/Library/Homebrew/diagnostic.rb
+++ b/Library/Homebrew/diagnostic.rb
@@ -100,8 +100,7 @@ module Homebrew
# See https://github.com/Homebrew/legacy-homebrew/pull/9986
def check_path_for_trailing_slashes
- all_paths = PATH.new(ENV["PATH"]).to_a
- bad_paths = all_paths.select { |p| p[-1..-1] == "/" }
+ bad_paths = PATH.new(ENV["PATH"]).select { |p| p[-1..-1] == "/" }
return if bad_paths.empty?
inject_file_list bad_paths, <<-EOS.undent