Permit multiple uninstall stanzas in casks (temp)

Longer-term solution is described [here](https://github.com/Homebrew/brew/issues/14365#issuecomment-1398214354).
This commit is contained in:
Alexander Regueiro 2023-01-21 18:44:57 +00:00
parent 31ed6906f9
commit b2b7072fbe
2 changed files with 0 additions and 26 deletions

View File

@ -185,10 +185,6 @@ module Cask
def check_single_uninstall_zap
odebug "Auditing single uninstall_* and zap stanzas"
if cask.artifacts.count { |k| k.is_a?(Artifact::Uninstall) } > 1
add_error "only a single uninstall stanza is allowed"
end
count = cask.artifacts.count do |k|
k.is_a?(Artifact::PreflightBlock) &&
k.directives.key?(:uninstall_preflight)

View File

@ -600,28 +600,6 @@ describe Cask::Audit, :cask do
end
end
describe "uninstall stanza checks" do
let(:message) { "only a single uninstall stanza is allowed" }
context "when the Cask has no uninstall stanza" do
let(:cask_token) { "with-zap-rmdir" }
it { is_expected.not_to fail_with(message) }
end
context "when the Cask has only one uninstall stanza" do
let(:cask_token) { "with-uninstall-rmdir" }
it { is_expected.not_to fail_with(message) }
end
context "when the Cask has multiple uninstall stanzas" do
let(:cask_token) { "with-uninstall-multi" }
it { is_expected.to fail_with(message) }
end
end
describe "uninstall_preflight stanza checks" do
let(:message) { "only a single uninstall_preflight stanza is allowed" }