Merge pull request #16717 from jesboat/fix-chmod-message2

[brew audit] fix "Incorrect file permissions" message
This commit is contained in:
Mike McQuaid 2024-02-22 08:51:52 +00:00 committed by GitHub
commit b8243d0e9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ module RuboCop
if actual_mode & 0444 != 0444 if actual_mode & 0444 != 0444
problem format("Incorrect file permissions (%03<actual>o): chmod %<wanted>s %<path>s", problem format("Incorrect file permissions (%03<actual>o): chmod %<wanted>s %<path>s",
actual: actual_mode & 0777, actual: actual_mode & 0777,
wanted: "+r", wanted: "a+r",
path: file_path) path: file_path)
end end
# Check that the file is user-writeable. # Check that the file is user-writeable.

View File

@ -13,7 +13,7 @@ RSpec.describe RuboCop::Cop::FormulaAudit::Files do
expect_offense(<<~RUBY, file) expect_offense(<<~RUBY, file)
class Foo < Formula 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" url "https://brew.sh/foo-1.0.tgz"
end end
RUBY RUBY