Rubocop 0.53.0 automatic fixes.

This commit is contained in:
Mike McQuaid 2018-03-06 09:36:49 +00:00
parent 718a2112d7
commit e03f07f302
8 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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,

View File

@ -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")