[Library/Homebrew/cli/named_args.rb] to_formulae_to_casks(): Reassociate its
`rescue` block with the right enclosing scope.
PR #9398 accidentally removed some semantically significant indentation in
this function, thus inadvertently kicking the `rescue` block inside out to func-
tion scope, when it moved its code further up in the file. This may well not
confuse a Ruby interpreter, but it could trip human readers up. Compensate and
correct the overlooked offending oversight and potential refactoring mistake by
restoring only that indentation, leaving the function in its new location.
Refs #9398.
This commit is contained in:
parent
f901b57bb5
commit
c237223e15
@ -48,8 +48,8 @@ module Homebrew
|
||||
@to_formulae_and_casks ||= {}
|
||||
@to_formulae_and_casks[only] ||= downcased_unique_named.flat_map do |name|
|
||||
load_formula_or_cask(name, only: only, method: method)
|
||||
rescue NoSuchKegError, FormulaUnavailableError, Cask::CaskUnavailableError
|
||||
ignore_unavailable ? [] : raise
|
||||
rescue NoSuchKegError, FormulaUnavailableError, Cask::CaskUnavailableError
|
||||
ignore_unavailable ? [] : raise
|
||||
end.uniq.freeze
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user