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