Display skip-clean warning only before clean
Not anytime the formula loads.
This commit is contained in:
		
							parent
							
								
									a7946e0088
								
							
						
					
					
						commit
						5790f4b523
					
				@ -678,11 +678,7 @@ private
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def skip_clean paths
 | 
					    def skip_clean paths
 | 
				
			||||||
      if paths == :all
 | 
					      if paths == :all
 | 
				
			||||||
        opoo "skip_clean :all is deprecated"
 | 
					        @skip_clean_all = true
 | 
				
			||||||
        puts "Skip clean was commonly used to prevent brew from stripping binaries."
 | 
					 | 
				
			||||||
        puts "brew no longer strips binaries, if skip_clean is required to prevent"
 | 
					 | 
				
			||||||
        puts "brew from removing empty directories, you should specify exact paths"
 | 
					 | 
				
			||||||
        puts "in the formula."
 | 
					 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      @skip_clean_paths ||= []
 | 
					      @skip_clean_paths ||= []
 | 
				
			||||||
 | 
				
			|||||||
@ -294,6 +294,14 @@ class FormulaInstaller
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def clean
 | 
					  def clean
 | 
				
			||||||
 | 
					    if f.class.skip_clean_all?
 | 
				
			||||||
 | 
					      opoo "skip_clean :all is deprecated"
 | 
				
			||||||
 | 
					      puts "Skip clean was commonly used to prevent brew from stripping binaries."
 | 
				
			||||||
 | 
					      puts "brew no longer strips binaries, if skip_clean is required to prevent"
 | 
				
			||||||
 | 
					      puts "brew from removing empty directories, you should specify exact paths"
 | 
				
			||||||
 | 
					      puts "in the formula."
 | 
				
			||||||
 | 
					      return
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
    require 'cleaner'
 | 
					    require 'cleaner'
 | 
				
			||||||
    Cleaner.new f
 | 
					    Cleaner.new f
 | 
				
			||||||
  rescue Exception => e
 | 
					  rescue Exception => e
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user