diff options
| author | Adam Vandenberg | 2011-06-07 13:18:00 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-06-07 13:18:00 -0700 |
| commit | b15be6965d74e14b13821a819e7fb936c9e6ca04 (patch) | |
| tree | be3d2d7a4d37d96abc1b8b0445577ccbb0c12acd /Library | |
| parent | ef47a2262ce5d60720a0f7dfb85af1cffc274e8a (diff) | |
| download | brew-b15be6965d74e14b13821a819e7fb936c9e6ca04.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 |
