Merge pull request #17965 from Homebrew/formula-cookbook-stop-recommending-rmrf
Formula-Cookbook: Stop recommending `rm_f` in `postinstall`
This commit is contained in:
		
						commit
						78132b13bf
					
				@ -32,3 +32,7 @@ Style/RedundantRegexpArgument:
 | 
			
		||||
# Want to be able to display partial formulae in the docs.
 | 
			
		||||
Style/TopLevelMethodDefinition:
 | 
			
		||||
  Enabled: false
 | 
			
		||||
 | 
			
		||||
# Formulae and Casks no longer use `rm_f`/`rm_rf`, so the docs need to match.
 | 
			
		||||
Lint/NonAtomicFileOperation:
 | 
			
		||||
  Enabled: false
 | 
			
		||||
 | 
			
		||||
@ -995,7 +995,7 @@ class Foo < Formula
 | 
			
		||||
  url "https://example.com/foo-1.0.tar.gz"
 | 
			
		||||
 | 
			
		||||
  def post_install
 | 
			
		||||
    rm_f pkgetc/"cert.pem"
 | 
			
		||||
    rm pkgetc/"cert.pem" if File.exist?(pkgetc/"cert.pem")
 | 
			
		||||
    pkgetc.install_symlink Formula["ca-certificates"].pkgetc/"cert.pem"
 | 
			
		||||
  end
 | 
			
		||||
  # ...
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user