diff --git a/docs/.rubocop.yml b/docs/.rubocop.yml index 1c984c707e2de..ca79d9e6ed746 100644 --- a/docs/.rubocop.yml +++ b/docs/.rubocop.yml @@ -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 diff --git a/docs/Formula-Cookbook.md b/docs/Formula-Cookbook.md index e037f01d61ccb..3883964384ffb 100644 --- a/docs/Formula-Cookbook.md +++ b/docs/Formula-Cookbook.md @@ -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 # ...