Fix that reason is coerced to a boolean
f762033a57 introduced a bug such that `reason` is coerced to a boolean, so when displayed it loses information about the actual return value from `MissingFormula.reason`. This patch re-scopes the assignment of `reason` such that the actual reason is retained, while also retaining the sense of the new boolean check.
This commit is contained in:
parent
a123d90e5d
commit
71fd680d51
@ -103,7 +103,7 @@ module Homebrew
|
||||
if $stdout.tty?
|
||||
count = all_formulae.count + all_casks.count
|
||||
|
||||
if reason = MissingFormula.reason(query, silent: true) && !local_casks.include?(query)
|
||||
if (reason = MissingFormula.reason(query, silent: true)) && !local_casks.include?(query)
|
||||
if count.positive?
|
||||
puts
|
||||
puts "If you meant #{query.inspect} specifically:"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user