Class: Cask::Artifact::App Private
- Defined in:
- cask/artifact/app.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 app stanza.
Instance Attribute Summary
Attributes inherited from AbstractArtifact
Instance Method Summary collapse
Methods inherited from Moved
english_description, #summarize_installed, #uninstall_phase
Methods included from OS::Mac::Cask::Artifact::Moved
Methods inherited from Relocated
from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a
Methods included from OS::Linux::Cask::Artifact::Relocated
Methods inherited from AbstractArtifact
#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #sort_order, #staged_path_join_executable, #summarize, #to_args
Methods included from Utils::Output::Mixin
#odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled
Constructor Details
This class inherits a constructor from Cask::Artifact::Relocated
Instance Method Details
#install_phase(adopt: false, auto_updates: false, force: false, verbose: false, predecessor: nil, successor: nil, reinstall: false, command: SystemCommand) ⇒ void
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.
This method returns an undefined value.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'cask/artifact/app.rb', line 22 def install_phase( adopt: false, auto_updates: false, force: false, verbose: false, predecessor: nil, successor: nil, reinstall: false, command: SystemCommand ) super return if target.ascend.none? { OS::Mac.system_dir?(it) } odebug "Fixing up '#{target}' permissions for installation to '#{target.parent}'" # Ensure that globally installed applications can be accessed by all users. # We shell out to `chmod` instead of using `FileUtils.chmod` so that using `+X` works correctly. command.run!("chmod", args: ["-R", "a+rX", target], sudo: !target.writable?) end |