Sha256: 2a76e4d07fc218553a28c55d59756fc5b6264588dc7d0298ab893bbee3bd8304
Contents?: true
Size: 502 Bytes
Versions: 22
Compression:
Stored size: 502 Bytes
Contents
module Kontena::Cli::Nodes::Vagrant class SshCommand < Clamp::Command include Kontena::Cli::Common 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
22 entries across 22 versions & 1 rubygems