Sha256: 034188d1371150b102c6299597400b80dd92f600d9fe715de01ffaa7e8455a4e
Contents?: true
Size: 763 Bytes
Versions: 18
Compression:
Stored size: 763 Bytes
Contents
module Kontena::Cli::Nodes::Vagrant class StartCommand < Clamp::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions parameter "NAME", "Node name" def execute require_api_url require_current_grid require 'kontena/machine/vagrant' vagrant_path = "#{Dir.home}/.kontena/#{current_grid}/#{name}" abort("Cannot find Vagrant node #{name}".colorize(:red)) unless Dir.exist?(vagrant_path) Dir.chdir(vagrant_path) do ShellSpinner "Starting Vagrant machine #{name.colorize(:cyan)} " do Open3.popen2('vagrant up') do |stdin, output, wait| while o = output.gets print o if ENV['DEBUG'] end end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems