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>
This commit is contained in:
		
							parent
							
								
									6c380f0e85
								
							
						
					
					
						commit
						5e25b08fe4
					
				@ -372,12 +372,12 @@ module Homebrew
 | 
			
		||||
              string = s.sub!(
 | 
			
		||||
                /(
 | 
			
		||||
                  \ {2}(                                                         # two spaces at the beginning
 | 
			
		||||
                    url\ ['"][\S\ ]+['"]                                              # url with a string
 | 
			
		||||
                    (url|head)\ ['"][\S\ ]+['"]                                  # url or head with a string
 | 
			
		||||
                    (
 | 
			
		||||
                      ,[\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
 | 
			
		||||
                    (homepage|desc|sha1|sha256|version|mirror)\ ['"][\S\ ]+['"]| # specs with a string
 | 
			
		||||
                    revision\ \d+                                                # revision with a number
 | 
			
		||||
                  )\n+                                                           # multiple empty lines
 | 
			
		||||
                 )+
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user