7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/vagrant-protobox/command/switch.rb', line 7
def execute
options = { verbose: false }
opts = OptionParser.new do |o|
o.banner = "Usage: vagrant protobox switch <config>"
end
argv = parse_options(opts)
return if !argv
if argv.empty? || argv.length > 1
raise Vagrant::Errors::CLIInvalidUsage,
help: opts.help.chomp
end
config = argv[0]
@env.action_runner.run(Protobox::Action.action_switch, {
config_name: config,
ui: Vagrant::UI::Prefixed.new(@env.ui, "protobox"),
})
0
end
|