Refactored check_resource to resource in print_latest_version

Co-authored-by: Nanda H Krishna <me@nandahkrishna.com>
This commit is contained in:
Mohammad Zain Abbas 2022-08-03 18:35:52 +05:00 committed by GitHub
parent 1abb51f2e8
commit fd4a02ff34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -503,8 +503,8 @@ check_resource: false)
end
# Formats and prints the livecheck result for a formula/cask/resource.
sig { params(info: Hash, verbose: T::Boolean, ambiguous_cask: T::Boolean, check_resource: T::Boolean).void }
def print_latest_version(info, verbose:, ambiguous_cask: false, check_resource: false)
sig { params(info: Hash, verbose: T::Boolean, ambiguous_cask: T::Boolean, resource: T::Boolean).void }
def print_latest_version(info, verbose:, ambiguous_cask: false, resource: false)
package_or_resource_s = check_resource ? " " : ""
package_or_resource_s += "#{Tty.blue}#{info[:formula] || info[:cask] || info[:resource]}#{Tty.reset}"
package_or_resource_s += " (cask)" if ambiguous_cask && !check_resource