mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
= New Concept: Cask::Artifact An Artifact is a file in an extacted container for which homebrew-cask should take some sort of action on install/uninstall. == Current artifacts: - App: link/unlink to ~/Applications - Pkg: install/uninstall (with sudo) - Prefpane: link/unlink to ~/Library/PreferencePanes = New Feature: Preference Pane Handling Specifying `prefpane 'MyApp.prefPane'` in a Cask causes it to be linked on install to the correct location for it to show up in System Preferences. refs #69 = Removed Commands: linkapps/unlinkapps These were old and mostly unused and don't really make much sense when linking/unlinking happens automatically in the install process. = Changed Behavior: stricter relative pathname requirement With this refactor, we remove the fuzzy searching for a file in an extracted container when that file was referenced from `link` or `install`. There may be some casks that need to be updated due to this change.
18 lines
401 B
Ruby
18 lines
401 B
Ruby
class Cask::CLI::Install
|
|
def self.run(*args)
|
|
cask_names = args.reject { |a| a == '--force' }
|
|
force = args.include? '--force'
|
|
cask_names.each do |cask_name|
|
|
begin
|
|
cask = Cask.load(cask_name)
|
|
Cask::Installer.new(cask).install(force)
|
|
rescue CaskError => e
|
|
onoe e
|
|
end
|
|
end
|
|
end
|
|
|
|
def self.help
|
|
"installs the cask of the given name"
|
|
end
|
|
end
|