lib/kontena/plugin/vagrant/master/start_command.rb in kontena-plugin-vagrant-0.2.7 vs lib/kontena/plugin/vagrant/master/start_command.rb in kontena-plugin-vagrant-0.3.0
- old
+ new
@@ -2,20 +2,15 @@
class StartCommand < Kontena::Command
include Kontena::Cli::Common
def execute
require_relative '../../../machine/vagrant'
-
+
vagrant_path = "#{Dir.home}/.kontena/vagrant_master"
abort("Cannot find Vagrant node kontena-master".colorize(:red)) unless Dir.exist?(vagrant_path)
Dir.chdir(vagrant_path) do
- spinner "Starting Vagrant machine kontena-master " do
- Open3.popen2('vagrant up') do |stdin, output, wait|
- while o = output.gets
- print o if ENV['DEBUG']
- end
- end
- end
+ spinner "Triggering 'vagrant up' for kontena-master"
+ exit $?.exitstatus unless system('vagrant up')
end
end
end
end