dev-cmd/bottle: don't assume desc present.

Fixes https://github.com/Homebrew/brew/pull/11057#issuecomment-817846023
This commit is contained in:
Mike McQuaid 2021-04-12 15:54:13 +01:00
parent 528ac5d5aa
commit 17da648c1b
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

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,