bump-revision: handle array of licenses
Allowing multiple licenses meant that `formula.license` returned an array. This converts that array to the appropriate format for `bump-revision`
This commit is contained in:
parent
8d97029b03
commit
1ac470fe7a
@ -42,9 +42,14 @@ module Homebrew
|
||||
end
|
||||
|
||||
old = if formula.license
|
||||
license_string = if formula.license.length > 1
|
||||
formula.license
|
||||
else
|
||||
"\"#{formula.license.first}\""
|
||||
end
|
||||
# insert replacement revision after license
|
||||
<<~EOS
|
||||
license "#{formula.license}"
|
||||
license #{license_string}
|
||||
EOS
|
||||
elsif formula.path.read.include?("stable do\n")
|
||||
# insert replacement revision after homepage
|
||||
|
Loading…
x
Reference in New Issue
Block a user