mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
14 lines
381 B
Ruby
14 lines
381 B
Ruby
module Cask::CLI::Edit
|
|
def self.run(*arguments)
|
|
cask_name, *args = *arguments
|
|
cask_path = Cask.path(cask_name)
|
|
unless cask_path.exist? || args.include?('--create')
|
|
raise CaskUnavailableError, "#{cask_name}, add --create to make a new cask with this name"
|
|
end
|
|
exec_editor cask_path
|
|
end
|
|
|
|
def self.help
|
|
"edits the cask of the given name"
|
|
end
|
|
end
|