From 50ce5ef3a40aeb11ce8e19660982ad7c89a69501 Mon Sep 17 00:00:00 2001 From: Seeker Date: Sun, 8 Nov 2020 06:22:50 -0800 Subject: [PATCH] bottle: fix adding bottle block to formulae with special licenses --- Library/Homebrew/dev-cmd/bottle.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 9198dd67b8..45fba5500e 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -536,7 +536,11 @@ module Homebrew (\n^\ {3}[\S\ ]+$)* # options can be in multiple lines )?| (homepage|desc|sha256|version|mirror|license)\ ['"][\S\ ]+['"]| # specs with a string - (license)\ [^\[]+?\[[^\]]+?\]| # license may contain a list + license\ ( + [^\[]+?\[[^\]]+?\]| # license may contain a list + [^{]+?{[^}]+?}| # license may contain a hash + :\S+ # license as a symbol + )| (revision|version_scheme)\ \d+| # revision with a number (stable|livecheck)\ do(\n+^\ {4}[\S\ ]+$)*\n+^\ {2}end # components with blocks )\n+ # multiple empty lines