mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
brew.{rb,sh}: move to Library/Homebrew. (#506)
This commit is contained in:
parent
a02be9eea2
commit
a07ab8bb92
@ -1,7 +1,7 @@
|
|||||||
std_trap = trap("INT") { exit! 130 } # no backtrace thanks
|
std_trap = trap("INT") { exit! 130 } # no backtrace thanks
|
||||||
|
|
||||||
require "pathname"
|
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)
|
$:.unshift(HOMEBREW_LIBRARY_PATH.to_s)
|
||||||
require "global"
|
require "global"
|
||||||
|
|
@ -245,5 +245,5 @@ else
|
|||||||
|
|
||||||
# Unshift command back into argument list (unless argument list was empty).
|
# Unshift command back into argument list (unless argument list was empty).
|
||||||
[[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@"
|
[[ "$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
|
fi
|
@ -9,7 +9,7 @@
|
|||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
source "$HOMEBREW_LIBRARY/Homebrew/utils/lock.sh"
|
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).
|
# provide speedup when using Git repeatedly (as update.sh does).
|
||||||
git() {
|
git() {
|
||||||
if [[ -z "$GIT_EXECUTABLE" ]]
|
if [[ -z "$GIT_EXECUTABLE" ]]
|
||||||
|
@ -34,7 +34,7 @@ SimpleCov.start do
|
|||||||
add_group "OS", "/Homebrew/os/"
|
add_group "OS", "/Homebrew/os/"
|
||||||
add_group "Requirements", "/Homebrew/requirements/"
|
add_group "Requirements", "/Homebrew/requirements/"
|
||||||
add_group "Scripts", %w[
|
add_group "Scripts", %w[
|
||||||
/brew.rb
|
/Homebrew/brew.rb
|
||||||
/Homebrew/build.rb
|
/Homebrew/build.rb
|
||||||
/Homebrew/postinstall.rb
|
/Homebrew/postinstall.rb
|
||||||
/Homebrew/test.rb
|
/Homebrew/test.rb
|
||||||
|
@ -64,7 +64,7 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
cmd_args << "-rsimplecov"
|
cmd_args << "-rsimplecov"
|
||||||
end
|
end
|
||||||
cmd_args << "-rintegration_mocks"
|
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
|
cmd_args += args
|
||||||
Bundler.with_original_env do
|
Bundler.with_original_env do
|
||||||
ENV["HOMEBREW_BREW_FILE"] = HOMEBREW_PREFIX/"bin/brew"
|
ENV["HOMEBREW_BREW_FILE"] = HOMEBREW_PREFIX/"bin/brew"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user