doctor: mess with indentation
This commit is contained in:
parent
f23cfa884c
commit
7b7268c065
@ -38,15 +38,13 @@ end
|
|||||||
|
|
||||||
|
|
||||||
class Checks
|
class Checks
|
||||||
# Sorry for the lack of an indent here, the diff would have been unreadable.
|
|
||||||
|
|
||||||
############# HELPERS
|
############# HELPERS
|
||||||
def remove_trailing_slash s
|
def remove_trailing_slash s
|
||||||
(s[s.length-1] == '/') ? s[0,s.length-1] : s
|
(s[s.length-1] == '/') ? s[0,s.length-1] : s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def paths
|
||||||
def paths
|
|
||||||
@paths ||= ENV['PATH'].split(':').collect do |p|
|
@paths ||= ENV['PATH'].split(':').collect do |p|
|
||||||
begin
|
begin
|
||||||
remove_trailing_slash(File.expand_path(p))
|
remove_trailing_slash(File.expand_path(p))
|
||||||
@ -54,7 +52,7 @@ def paths
|
|||||||
onoe "The following PATH component is invalid: #{p}"
|
onoe "The following PATH component is invalid: #{p}"
|
||||||
end
|
end
|
||||||
end.uniq.compact
|
end.uniq.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
# Finds files in HOMEBREW_PREFIX *and* /usr/local.
|
# Finds files in HOMEBREW_PREFIX *and* /usr/local.
|
||||||
# Specify paths relative to a prefix eg. "include/foo.h".
|
# Specify paths relative to a prefix eg. "include/foo.h".
|
||||||
@ -70,6 +68,7 @@ end
|
|||||||
end
|
end
|
||||||
############# END HELPERS
|
############# END HELPERS
|
||||||
|
|
||||||
|
# Sorry for the lack of an indent here, the diff would have been unreadable.
|
||||||
# See https://github.com/mxcl/homebrew/pull/9986
|
# See https://github.com/mxcl/homebrew/pull/9986
|
||||||
def check_path_for_trailing_slashes
|
def check_path_for_trailing_slashes
|
||||||
bad_paths = ENV['PATH'].split(':').select{|p| p[p.length-1, p.length] == '/'}
|
bad_paths = ENV['PATH'].split(':').select{|p| p[p.length-1, p.length] == '/'}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user