Sha256: 82124b8bca1120d5f0be1f7158050cd8b0b10456152f1acccbd3e2a4f94246a8

Contents?: true

Size: 516 Bytes

Versions: 3

Compression:

Stored size: 516 Bytes

Contents

module Kontena::Plugin::Vagrant::Master
  class StartCommand < Kontena::Command
    include Kontena::Cli::Common

    def execute
      require_relative '../../../machine/vagrant'

      vagrant_path = "#{Dir.home}/.krates/vagrant_master"
      abort("Cannot find Vagrant node krates-master".colorize(:red)) unless Dir.exist?(vagrant_path)
      Dir.chdir(vagrant_path) do
        spinner "Triggering 'vagrant up' for krates-master"
        exit $?.exitstatus unless system('vagrant up')
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
krates-plugin-vagrant-0.3.6 lib/kontena/plugin/vagrant/master/start_command.rb
krates-plugin-vagrant-0.3.5 lib/kontena/plugin/vagrant/master/start_command.rb
krates-plugin-vagrant-0.3.4 lib/kontena/plugin/vagrant/master/start_command.rb