diff --git a/Library/Homebrew/rubocops/files.rb b/Library/Homebrew/rubocops/files.rb index a27a37b6c0..33443232de 100644 --- a/Library/Homebrew/rubocops/files.rb +++ b/Library/Homebrew/rubocops/files.rb @@ -22,7 +22,7 @@ module RuboCop if actual_mode & 0444 != 0444 problem format("Incorrect file permissions (%03o): chmod %s %s", actual: actual_mode & 0777, - wanted: "+r", + wanted: "a+r", path: file_path) end # Check that the file is user-writeable. diff --git a/Library/Homebrew/test/rubocops/files_spec.rb b/Library/Homebrew/test/rubocops/files_spec.rb index 52071477fa..d6f9505fb5 100644 --- a/Library/Homebrew/test/rubocops/files_spec.rb +++ b/Library/Homebrew/test/rubocops/files_spec.rb @@ -13,7 +13,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::Files do expect_offense(<<~RUBY, file) class Foo < Formula - ^^^^^^^^^^^^^^^^^^^ FormulaAudit/Files: Incorrect file permissions (000): chmod +r #{filename} + ^^^^^^^^^^^^^^^^^^^ FormulaAudit/Files: Incorrect file permissions (000): chmod a+r #{filename} url "https://brew.sh/foo-1.0.tgz" end RUBY