diff options
| author | Adam Vandenberg | 2013-09-15 20:11:17 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-09-17 06:44:25 -0700 |
| commit | a126946a9be8a1915ce516a674ffe4663583f691 (patch) | |
| tree | 37bc0a8df2be780c4dc9ccc616b0fbe10f5542ca /Library/Homebrew/utils.rb | |
| parent | fa0872a42c388f81fac1d65e130462de6da3977b (diff) | |
| download | brew-a126946a9be8a1915ce516a674ffe4663583f691.tar.bz2 | |
move paths to utils
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index f99b0a03e..8a266ef7a 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -238,6 +238,16 @@ def nostdout end end +def paths + @paths ||= ENV['PATH'].split(File::PATH_SEPARATOR).collect do |p| + begin + File.expand_path(p).chomp('/') + rescue ArgumentError + onoe "The following PATH component is invalid: #{p}" + end + end.uniq.compact +end + module GitHub extend self ISSUES_URI = URI.parse("https://api.github.com/legacy/issues/search/mxcl/homebrew/open/") |
