Skip to content

Commit

Permalink
cask/quarantine: sudo correctly during tests.
Browse files Browse the repository at this point in the history
Use `NeverSudoSystemCommand` and pass it through to
`Quarantine.copy_xattrs` so `brew tests` doesn't try to `sudo`.

Fixes #15958

Co-authored-by: Bo Anderson <mail@boanderson.me>
Co-authored-by: Kevin <apainintheneck@gmail.com>
  • Loading branch information
3 people committed Sep 6, 2023
1 parent 43295b2 commit 0aea018
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/quarantine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def self.copy_xattrs(from, to)
from,
to,
],
sudo: !to.writable?,
sudo: ENV["HOMEBREW_TESTS"].blank? && !to.writable?,
)
end

Expand Down

0 comments on commit 0aea018

Please sign in to comment.