Class: Cask::Artifact::Zap Private

Inherits:
AbstractUninstall show all
Defined in:
cask/artifact/zap.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Artifact corresponding to the zap stanza.

Constant Summary

Constants inherited from AbstractUninstall

AbstractUninstall::METADATA_KEYS, AbstractUninstall::ORDERED_DIRECTIVES, AbstractUninstall::UPGRADE_REINSTALL_SKIP_DIRECTIVES

Constants inherited from AbstractArtifact

AbstractArtifact::DirectivesType

Instance Attribute Summary

Attributes inherited from AbstractUninstall

#directives

Attributes inherited from AbstractArtifact

#cask

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractUninstall

bundle_identifier_for_pid, #bundle_ids_to_reopen, dispatch_directives, #dispatch_uninstall_directive, #each_resolved_path, #find_launchctl_with_wildcard, #initialize, owner_uid, parent_pid, #summarize, #to_h, #uninstall_quit

Methods included from SystemCommand::Mixin

#command_sandbox, #system_command, #system_command!

Methods included from OS::Mac::Cask::Artifact::AbstractUninstall

#undeletable?

Methods inherited from AbstractArtifact

#cask_sandbox, #config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #requires_sudo?, #run_cask_sandbox, #sort_order, #staged_path_join_executable, #summarize, #to_args

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_once, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_cannot_install, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_removed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning

Constructor Details

This class inherits a constructor from Cask::Artifact::AbstractUninstall

Class Method Details

.from_args(cask, exemption = nil, **directives) ⇒ Zap

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

:not_required is serialised as an empty stanza, which older versions of Homebrew can still load from the API.

Parameters:

Returns:



13
14
15
16
17
18
19
# File 'cask/artifact/zap.rb', line 13

def self.from_args(cask, exemption = nil, **directives)
  if exemption && (exemption != :not_required || directives.any?)
    raise CaskInvalidError.new(cask, "'zap' stanza requires either directives or only ':not_required'.")
  end

  new(cask, **directives)
end

Instance Method Details

#deferred_directives ⇒ Array<Symbol>

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Removing files also waits, as uninstall steps may still need them, e.g. to identify a keychain certificate to delete.

Returns:



24
# File 'cask/artifact/zap.rb', line 24

def deferred_directives = [:pkgutil, :delete, :trash, :rmdir]