diff options
| author | Adam Vandenberg | 2011-06-07 13:18:00 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-06-07 13:18:00 -0700 |
| commit | c240eab0ee2302441770a1f4192b59603ef89092 (patch) | |
| tree | fcd31b01b5f9c04f53711067a0950fdbe527e840 /Library | |
| parent | 800f03bcabb01eb6340883895dab71558fd5d2f1 (diff) | |
| download | homebrew-c240eab0ee2302441770a1f4192b59603ef89092.tar.bz2 | |
brew-doctor: do not complain about trailing slashes
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 7 |
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 |
