Skip to content

Commit

Permalink
Formula-Cookbook: Stop recommending rm_f in postinstall
Browse files Browse the repository at this point in the history
- After all the work that went into
  Homebrew#17705, we
  don't want the docs disagreeing with what CI says
  the style should be.
  • Loading branch information
issyl0 authored and ctaintor committed Sep 4, 2024
1 parent 49e7391 commit 94e1b2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/Formula-Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ...
Expand Down

0 comments on commit 94e1b2a

Please sign in to comment.