aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorbigbes2016-01-11 00:26:48 +0700
committerDominyk Tiller2016-01-14 03:48:03 +0000
commit5e25b08fe4b67c08ca2c36d21c7d6dd138618ac2 (patch)
tree37bae98246fe22a15c2e20164372d5fc53039562 /Library/Homebrew/cmd
parent6c380f0e854ae9c64c21d08a98c048eb62ad5972 (diff)
downloadbrew-5e25b08fe4b67c08ca2c36d21c7d6dd138618ac2.tar.bz2
bottle: merging problem when head conatins commas
If `head` sections contains commas (e.g. `url "https://github.com/tarantool/tarantool.git", :branch => "1.6", :shallow => false`) then re thinks that it reached the end and inserts `bottle do <-> end` block before it, that leads to problems in ` brew audit --devel tarantool --strict --online`: ``` ==> audit problems tarantool: * `head` (line 11) should be put before `bottle block` (line 7) ``` It blocks Homebrew/homebrew#47495 Closes Homebrew/homebrew#47931. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/bottle.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 83f1147c5..c2ea0941d 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -371,15 +371,15 @@ module Homebrew
else
string = s.sub!(
/(
- \ {2}( # two spaces at the beginning
- url\ ['"][\S\ ]+['"] # url with a string
+ \ {2}( # two spaces at the beginning
+ (url|head)\ ['"][\S\ ]+['"] # url or head with a string
(
- ,[\S\ ]*$ # url may have options
- (\n^\ {3}[\S\ ]+$)* # options can be in multiple lines
+ ,[\S\ ]*$ # url may have options
+ (\n^\ {3}[\S\ ]+$)* # options can be in multiple lines
)?|
- (homepage|desc|sha1|sha256|head|version|mirror)\ ['"][\S\ ]+['"]| # specs with a string
- revision\ \d+ # revision with a number
- )\n+ # multiple empty lines
+ (homepage|desc|sha1|sha256|version|mirror)\ ['"][\S\ ]+['"]| # specs with a string
+ revision\ \d+ # revision with a number
+ )\n+ # multiple empty lines
)+
/mx, '\0' + output + "\n")
end