aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-06-07 13:18:00 -0700
committerAdam Vandenberg2011-06-07 13:18:00 -0700
commitc240eab0ee2302441770a1f4192b59603ef89092 (patch)
treefcd31b01b5f9c04f53711067a0950fdbe527e840 /Library
parent800f03bcabb01eb6340883895dab71558fd5d2f1 (diff)
downloadhomebrew-c240eab0ee2302441770a1f4192b59603ef89092.tar.bz2
brew-doctor: do not complain about trailing slashes
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 7fe733290..91df75d68 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -31,8 +31,13 @@ def is_prefix? prefix, longer_string
end
+def remove_trailing_slash s
+ (s[s.length-1] == '/') ? s[0,s.length-1] : s
+end
+
+
def path_folders
- ENV['PATH'].split(':').collect{|p| File.expand_path p}.uniq
+ ENV['PATH'].split(':').collect{|p| remove_trailing_slash(File.expand_path(p))}.uniq
end