Merge pull request #11115 from MikeMcQuaid/bottle_desc_fix

dev-cmd/bottle: don't assume `desc` present.
This commit is contained in:
Mike McQuaid 2021-04-12 16:21:47 +01:00 committed by GitHub
commit 9a3763878e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -525,7 +525,7 @@ module Homebrew
"tap_git_revision" => tap_git_revision,
"tap_git_remote" => tap_git_remote,
# descriptions can contain emoji. sigh.
"desc" => f.desc.encode(
"desc" => f.desc.to_s.encode(
Encoding.find("ASCII"),
invalid: :replace, undef: :replace, replace: "",
).strip,