mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 22:06:36 -06:00
- add new file "cask/utils.rb" analogous to "utils.rb" in Homebrew - define odebug and odumpcask, analogs of ohai and friends, but which only give output when --debug is in effect - move the debug setting from an instance variable in Cask::CLI to a method Cask.debug, defined in "lib/cask/options.rb", which was added in #2276. (Perhaps options.rb should be merged back into Cask::CLI). - sprinkle odebug statements liberally throughout the codebase - update tests
16 lines
473 B
Ruby
16 lines
473 B
Ruby
module Cask::CLI::Edit
|
|
def self.run(*arguments)
|
|
raise CaskUnspecifiedError if arguments.empty?
|
|
cask_name, *_ = *arguments
|
|
cask_path = Cask.path(cask_name)
|
|
odebug "Opening editor for Cask #{cask_name}"
|
|
unless cask_path.exist?
|
|
raise CaskUnavailableError, "#{cask_name}, use `brew cask create #{cask_name}` 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
|