Class: VagrantPlugins::Cienv::Command::InitEnvironment

Inherits:
Base
  • Object
show all
Defined in:
lib/vagrant-qienv/command/init.rb

Instance Method Summary collapse

Methods inherited from Base

#action

Instance Method Details

#executeObject

Raises:

  • (Vagrant::Errors::CLIInvalidUsage)


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/vagrant-qienv/command/init.rb', line 9

def execute
  opts = OptionParser.new do |o|
    o.banner = "Usage: vagrant qi init [-h]"
  end

  # Parse the options
  argv = parse_options(opts)
  return if !argv
  raise Vagrant::Errors::CLIInvalidUsage, help: opts.help.chomp if argv.length > 0

  # List the installed plugins
  action(Action.action_init)

  # Success, exit status 0
  0
end