Merge pull request #764 from reitermarkus/remove-load-path-warning

Remove LOAD_PATH warning from Hbc::CLI::Doctor.
This commit is contained in:
Mike McQuaid 2016-08-20 08:47:11 +01:00 committed by GitHub
commit 7b1c5f0d86

View File

@ -188,12 +188,8 @@ class Hbc::CLI::Doctor < Hbc::CLI::Base
end end
def self.render_load_path(paths) def self.render_load_path(paths)
return "#{none_string} #{error_string}" if paths.nil? || paths.empty? return "#{none_string} #{error_string}" if [*paths].empty?
copy = Array.new(paths) paths
unless Hbc::Utils.file_is_descendant(copy[0], homebrew_taps)
copy[0] = "#{copy[0]} #{error_string 'error: should be descendant of Homebrew taps directory'}"
end
copy
end end
def self.render_cached_downloads def self.render_cached_downloads