Fix cleanup for files with --.
				
					
				
			This commit is contained in:
		
							parent
							
								
									4a9e0511f6
								
							
						
					
					
						commit
						4a48297d1c
					
				@ -83,7 +83,7 @@ module Homebrew
 | 
				
			|||||||
          version = file.version
 | 
					          version = file.version
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
        next unless version
 | 
					        next unless version
 | 
				
			||||||
        next unless (name = file.basename.to_s[/(.*)-(?:#{Regexp.escape(version)})/, 1])
 | 
					        next unless (name = file.basename.to_s[/\A(.*?)\-\-?(?:#{Regexp.escape(version)})/, 1])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        next unless HOMEBREW_CELLAR.directory?
 | 
					        next unless HOMEBREW_CELLAR.directory?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -226,8 +226,8 @@ describe Homebrew::Cleanup do
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    context "cleans old files in HOMEBREW_CACHE" do
 | 
					    context "cleans old files in HOMEBREW_CACHE" do
 | 
				
			||||||
      let(:bottle) { (HOMEBREW_CACHE/"testball-0.0.1.bottle.tar.gz") }
 | 
					      let(:bottle) { (HOMEBREW_CACHE/"testball--0.0.1.bottle.tar.gz") }
 | 
				
			||||||
      let(:testball) { (HOMEBREW_CACHE/"testball-0.0.1") }
 | 
					      let(:testball) { (HOMEBREW_CACHE/"testball--0.0.1") }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      before do
 | 
					      before do
 | 
				
			||||||
        FileUtils.touch(bottle)
 | 
					        FileUtils.touch(bottle)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user