From a126946a9be8a1915ce516a674ffe4663583f691 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 15 Sep 2013 20:11:17 -0700 Subject: move paths to utils --- Library/Homebrew/utils.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Library/Homebrew/utils.rb') 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/") -- cgit v1.2.3