homebrew-cask/lib/cask/cli/edit.rb

15 lines
381 B
Ruby
Raw Normal View History

2013-04-05 04:24:28 +08:00
module Cask::CLI::Edit
2012-09-22 12:32:19 +08:00
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
2012-09-22 12:32:19 +08:00
exec_editor cask_path
end
def self.help
"edits the cask of the given name"
end
end