Sha256: 615d76cd7cc0e8ce7f8a3c1fa9219fbb905f60468ce86cbb32a63dbb83cc85a7
Contents?: true
Size: 540 Bytes
Versions: 18
Compression:
Stored size: 540 Bytes
Contents
module Kontena::Cli::Nodes::Vagrant class SshCommand < 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 system('vagrant ssh') end end end end
Version data entries
18 entries across 18 versions & 1 rubygems