Skip to content
Snippets Groups Projects
Commit a07ab8bb authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

brew.{rb,sh}: move to Library/Homebrew. (#506)

parent a02be9ee
No related branches found
No related tags found
No related merge requests found
std_trap = trap("INT") { exit! 130 } # no backtrace thanks
require "pathname"
HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent.join("Homebrew")
HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent
$:.unshift(HOMEBREW_LIBRARY_PATH.to_s)
require "global"
......
......@@ -245,5 +245,5 @@ else
# Unshift command back into argument list (unless argument list was empty).
[[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@"
{ update-preinstall; exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@"; }
{ update-preinstall; exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; }
fi
......@@ -9,7 +9,7 @@
# shellcheck source=/dev/null
source "$HOMEBREW_LIBRARY/Homebrew/utils/lock.sh"
# Replaces the function in Library/brew.sh to cache the Git executable to
# Replaces the function in Library/Homebrew/brew.sh to cache the Git executable to
# provide speedup when using Git repeatedly (as update.sh does).
git() {
if [[ -z "$GIT_EXECUTABLE" ]]
......
......@@ -34,7 +34,7 @@ SimpleCov.start do
add_group "OS", "/Homebrew/os/"
add_group "Requirements", "/Homebrew/requirements/"
add_group "Scripts", %w[
/brew.rb
/Homebrew/brew.rb
/Homebrew/build.rb
/Homebrew/postinstall.rb
/Homebrew/test.rb
......
......@@ -64,7 +64,7 @@ class IntegrationCommandTests < Homebrew::TestCase
cmd_args << "-rsimplecov"
end
cmd_args << "-rintegration_mocks"
cmd_args << (HOMEBREW_LIBRARY_PATH/"../brew.rb").resolved_path.to_s
cmd_args << (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path.to_s
cmd_args += args
Bundler.with_original_env do
ENV["HOMEBREW_BREW_FILE"] = HOMEBREW_PREFIX/"bin/brew"
......
......@@ -25,4 +25,4 @@ fi
HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library"
source "$HOMEBREW_LIBRARY/brew.sh"
source "$HOMEBREW_LIBRARY/Homebrew/brew.sh"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment