mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Rubocop 0.53.0 automatic fixes.
This commit is contained in:
parent
718a2112d7
commit
e03f07f302
@ -344,7 +344,7 @@ module Homebrew
|
||||
rescue FormulaInstallationAlreadyAttemptedError
|
||||
# We already attempted to install f as part of the dependency tree of
|
||||
# another formula. In that case, don't generate an error, just move on.
|
||||
return
|
||||
nil
|
||||
rescue CannotInstallFormulaError => e
|
||||
ofail e.message
|
||||
end
|
||||
|
@ -47,7 +47,7 @@ module Homebrew
|
||||
fi.install
|
||||
fi.finish
|
||||
rescue FormulaInstallationAlreadyAttemptedError
|
||||
return
|
||||
nil
|
||||
rescue Exception # rubocop:disable Lint/RescueException
|
||||
ignore_interrupts { restore_backup(keg, keg_was_linked) }
|
||||
raise
|
||||
|
@ -139,7 +139,7 @@ module Homebrew
|
||||
rescue FormulaInstallationAlreadyAttemptedError
|
||||
# We already attempted to upgrade f as part of the dependency tree of
|
||||
# another formula. In that case, don't generate an error, just move on.
|
||||
return
|
||||
nil
|
||||
rescue CannotInstallFormulaError => e
|
||||
ofail e
|
||||
rescue BuildError => e
|
||||
|
@ -966,7 +966,7 @@ module Homebrew
|
||||
Putting non-prefixed coreutils in your path can cause gmp builds to fail.
|
||||
EOS
|
||||
rescue FormulaUnavailableError
|
||||
return
|
||||
nil
|
||||
end
|
||||
|
||||
def check_for_non_prefixed_findutils
|
||||
@ -981,7 +981,7 @@ module Homebrew
|
||||
Putting non-prefixed findutils in your path can cause python builds to fail.
|
||||
EOS
|
||||
rescue FormulaUnavailableError
|
||||
return
|
||||
nil
|
||||
end
|
||||
|
||||
def check_for_pydistutils_cfg_in_home
|
||||
|
@ -31,7 +31,7 @@ class SystemConfig
|
||||
return "N/A" unless CoreTap.instance.installed?
|
||||
Formulary.factory(formula).linked_version || "N/A"
|
||||
rescue FormulaUnavailableError
|
||||
return "N/A"
|
||||
"N/A"
|
||||
end
|
||||
|
||||
def dump_verbose_config(out = $stdout)
|
||||
|
@ -44,7 +44,7 @@ class FormulaVersions
|
||||
# continue walking the history
|
||||
ohai "#{e} in #{name} at revision #{rev}", e.backtrace if ARGV.debug?
|
||||
rescue FormulaUnavailableError
|
||||
return
|
||||
nil
|
||||
ensure
|
||||
Homebrew.raise_deprecation_exceptions = false
|
||||
end
|
||||
|
@ -326,8 +326,8 @@ class Tab < OpenStruct
|
||||
"time" => time,
|
||||
"source_modified_time" => source_modified_time.to_i,
|
||||
"HEAD" => self.HEAD,
|
||||
"stdlib" => (stdlib.to_s if stdlib),
|
||||
"compiler" => (compiler.to_s if compiler),
|
||||
"stdlib" => (stdlib&.to_s),
|
||||
"compiler" => (compiler&.to_s),
|
||||
"aliases" => aliases,
|
||||
"runtime_dependencies" => runtime_dependencies,
|
||||
"source" => source,
|
||||
|
@ -16,9 +16,9 @@ TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") do |k|
|
||||
end
|
||||
|
||||
# Paths pointing into the Homebrew code base that persist across test runs
|
||||
HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../../..", __FILE__))
|
||||
HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../..", __dir__))
|
||||
HOMEBREW_SHIMS_PATH = HOMEBREW_LIBRARY_PATH.parent+"Homebrew/shims"
|
||||
HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":")
|
||||
HOMEBREW_LOAD_PATH = [File.expand_path(__dir__), HOMEBREW_LIBRARY_PATH].join(":")
|
||||
|
||||
# Paths redirected to a temporary directory and wiped at the end of the test run
|
||||
HOMEBREW_PREFIX = Pathname.new(TEST_TMPDIR).join("prefix")
|
||||
|
Loading…
x
Reference in New Issue
Block a user