Class: HeadChef::Cli
- Inherits:
-
Thor
- Object
- Thor
- HeadChef::Cli
- Defined in:
- lib/head_chef/cli.rb
Class Method Summary collapse
Class Method Details
.start(given_args = ARGV, config = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/head_chef/cli.rb', line 9 def start(given_args=ARGV, config={}) begin super HeadChef.cleanup rescue Berkshelf::BerkshelfError => e HeadChef.ui.error e Kernel.exit(e.status_code) rescue Ridley::Errors::HTTPError => e HeadChef.ui.error "#{e.class}: #{e} \nEndpoint: #{e.env[:url]}" Kernel.exit(1337) end end |