Reorder global.
This commit is contained in:
parent
2ad7f5317c
commit
7348185347
@ -1,7 +1,6 @@
|
||||
# typed: true
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "cli/named_args"
|
||||
require "ostruct"
|
||||
|
||||
module Homebrew
|
||||
@ -16,6 +15,8 @@ module Homebrew
|
||||
|
||||
sig { void }
|
||||
def initialize
|
||||
require "cli/named_args"
|
||||
|
||||
super()
|
||||
|
||||
@processed_options = []
|
||||
|
||||
@ -9,6 +9,11 @@ require "ostruct"
|
||||
require "pp"
|
||||
require "forwardable"
|
||||
|
||||
require "rbconfig"
|
||||
|
||||
RUBY_PATH = Pathname.new(RbConfig.ruby).freeze
|
||||
RUBY_BIN = RUBY_PATH.dirname.freeze
|
||||
|
||||
require_relative "load_path"
|
||||
|
||||
require "rubygems"
|
||||
@ -41,26 +46,11 @@ HOMEBREW_DEFAULT_CACHE = ENV["HOMEBREW_DEFAULT_CACHE"]
|
||||
HOMEBREW_DEFAULT_LOGS = ENV["HOMEBREW_DEFAULT_LOGS"]
|
||||
HOMEBREW_DEFAULT_TEMP = ENV["HOMEBREW_DEFAULT_TEMP"]
|
||||
HOMEBREW_REQUIRED_RUBY_VERSION = ENV["HOMEBREW_REQUIRED_RUBY_VERSION"]
|
||||
require "env_config"
|
||||
|
||||
require "config"
|
||||
require "os"
|
||||
require "context"
|
||||
require "extend/pathname"
|
||||
require "extend/predicable"
|
||||
require "extend/module"
|
||||
require "cli/args"
|
||||
require "messages"
|
||||
|
||||
HOMEBREW_PRODUCT = ENV["HOMEBREW_PRODUCT"]
|
||||
HOMEBREW_VERSION = ENV["HOMEBREW_VERSION"]
|
||||
HOMEBREW_WWW = "https://brew.sh"
|
||||
|
||||
require "rbconfig"
|
||||
|
||||
RUBY_PATH = Pathname.new(RbConfig.ruby).freeze
|
||||
RUBY_BIN = RUBY_PATH.dirname.freeze
|
||||
|
||||
HOMEBREW_USER_AGENT_CURL = ENV["HOMEBREW_USER_AGENT_CURL"]
|
||||
HOMEBREW_USER_AGENT_RUBY =
|
||||
"#{ENV["HOMEBREW_USER_AGENT"]} ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
|
||||
@ -72,8 +62,18 @@ HOMEBREW_DEFAULT_PREFIX = "/usr/local"
|
||||
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX = "/opt/homebrew"
|
||||
HOMEBREW_LINUX_DEFAULT_PREFIX = "/home/linuxbrew/.linuxbrew"
|
||||
|
||||
HOMEBREW_PULL_API_REGEX =
|
||||
%r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}.freeze
|
||||
HOMEBREW_PULL_OR_COMMIT_URL_REGEX =
|
||||
%r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})].freeze
|
||||
HOMEBREW_RELEASES_URL_REGEX =
|
||||
%r{https://github\.com/([\w-]+)/([\w-]+)?/releases/download/(.+)}.freeze
|
||||
|
||||
require "fileutils"
|
||||
|
||||
require "os"
|
||||
require "os/global"
|
||||
require "messages"
|
||||
|
||||
module Homebrew
|
||||
extend FileUtils
|
||||
@ -111,12 +111,14 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
HOMEBREW_PULL_API_REGEX =
|
||||
%r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}.freeze
|
||||
HOMEBREW_PULL_OR_COMMIT_URL_REGEX =
|
||||
%r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})].freeze
|
||||
HOMEBREW_RELEASES_URL_REGEX =
|
||||
%r{https://github\.com/([\w-]+)/([\w-]+)?/releases/download/(.+)}.freeze
|
||||
require "env_config"
|
||||
|
||||
require "config"
|
||||
require "context"
|
||||
require "extend/pathname"
|
||||
require "extend/predicable"
|
||||
require "extend/module"
|
||||
require "cli/args"
|
||||
|
||||
require "PATH"
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
# typed: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "env_config"
|
||||
|
||||
# Enables experimental `patchelf.rb` write support.
|
||||
HOMEBREW_PATCHELF_RB_WRITE = (
|
||||
ENV["HOMEBREW_NO_PATCHELF_RB_WRITE"].blank? &&
|
||||
@ -9,7 +11,7 @@ HOMEBREW_PATCHELF_RB_WRITE = (
|
||||
).freeze
|
||||
|
||||
module Homebrew
|
||||
DEFAULT_PREFIX ||= if Homebrew::EnvConfig.force_homebrew_on_linux?
|
||||
DEFAULT_PREFIX ||= if EnvConfig.force_homebrew_on_linux?
|
||||
HOMEBREW_DEFAULT_PREFIX
|
||||
else
|
||||
HOMEBREW_LINUX_DEFAULT_PREFIX
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
# typed: true
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "config"
|
||||
|
||||
# Match taps' formulae, e.g. `someuser/sometap/someformula`
|
||||
HOMEBREW_TAP_FORMULA_REGEX = %r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}.freeze
|
||||
# Match taps' casks, e.g. `someuser/sometap/somecask`
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
# typed: true
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "env_config"
|
||||
|
||||
# Various helper functions for interacting with TTYs.
|
||||
#
|
||||
# @api private
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user