aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/global.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/global.rb')
-rw-r--r--Library/Homebrew/global.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb
index 391f5b012..877253072 100644
--- a/Library/Homebrew/global.rb
+++ b/Library/Homebrew/global.rb
@@ -3,6 +3,7 @@ require "extend/fileutils"
require "extend/pathname"
require "extend/git_repository"
require "extend/ARGV"
+require "PATH"
require "extend/string"
require "os"
require "utils"
@@ -10,6 +11,7 @@ require "exceptions"
require "set"
require "rbconfig"
require "official_taps"
+require "pp"
ARGV.extend(HomebrewArgvExtension)
@@ -53,7 +55,8 @@ HOMEBREW_PULL_OR_COMMIT_URL_REGEX = %r[https://github\.com/([\w-]+)/([\w-]+)?/(?
require "compat" unless ARGV.include?("--no-compat") || ENV["HOMEBREW_NO_COMPAT"]
-ORIGINAL_PATHS = ENV["PATH"].split(File::PATH_SEPARATOR).map do |p|
+ENV["HOMEBREW_PATH"] ||= ENV["PATH"]
+ORIGINAL_PATHS = PATH.new(ENV["HOMEBREW_PATH"]).map do |p|
begin
Pathname.new(p).expand_path
rescue
@@ -61,7 +64,6 @@ ORIGINAL_PATHS = ENV["PATH"].split(File::PATH_SEPARATOR).map do |p|
end
end.compact.freeze
-# TODO: remove this as soon as it's removed from commands.rb.
HOMEBREW_INTERNAL_COMMAND_ALIASES = {
"ls" => "list",
"homepage" => "home",