6
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
|
# File 'lib/vagrant-node/nodeserverstart.rb', line 6
def execute
opts = OptionParser.new do |opts|
opts.banner = "Usage: vagrant nodeserver start [port=3333] -p password"
opts.separator ""
end
raise Errors::NoEnvironmentError if !@env.root_path
argv = parse_options(opts)
return if !argv
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length > 1
begin
ServerAPI::ServerManager.run(@env.tmp_path,@env.data_dir,@env,argv[0].to_i)
rescue Exception => e
@env.ui.error(e.message)
end
0
end
|