bump-revision: fix for license symbols

This commit is contained in:
Rylan Polster 2020-09-12 19:08:10 -04:00
parent 138c224be9
commit eb5e11a5e4

View File

@ -40,8 +40,11 @@ module Homebrew
end end
old = if formula.license old = if formula.license
license_string = if formula.license.is_a? String license_string = case formula.license
when String
"\"#{formula.license}\"" "\"#{formula.license}\""
when Symbol
":#{formula.license}"
else else
formula.license.to_s.gsub(/:(\w+)=>/, '\1: ') # Change `:any_of=>` to `any_of: ` formula.license.to_s.gsub(/:(\w+)=>/, '\1: ') # Change `:any_of=>` to `any_of: `
.tr("{}", "") # Remove braces .tr("{}", "") # Remove braces