Sha256: 2c786ccc193dccbe4788903c27ba3d8baac56264fc14c4b3953ebda6876becf0

Contents?: true

Size: 907 Bytes

Versions: 28

Compression:

Stored size: 907 Bytes

Contents

require 'optparse'

module Veewee
  module Command
    module Vagrant
      class Ssh < ::Vagrant::Command::Base
        def execute
          options = {}

          opts = OptionParser.new do |opts|
            opts.banner = "Ssh into the basebox"
            opts.separator ""
            opts.separator "Usage: vagrant basebox ssh <boxname> <command>"

            opts.on("-d", "--debug", "enable debugging") do |d|
              options['debug'] = d
            end

          end

          # Parse the options
          argv = parse_options(opts)
          return if !argv

          begin
            venv=Veewee::Environment.new(options)
            venv.ui=@env.ui
            venv.providers["virtualbox"].get_box(argv[0]).issh(argv[1])
          rescue Veewee::Error => ex
            venv.ui.error(ex,:prefix => false)
            exit -1
          end

        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
veewee-0.3.4 lib/veewee/command/vagrant/ssh.rb
veewee-0.3.3 lib/veewee/command/vagrant/ssh.rb
veewee-0.3.2 lib/veewee/command/vagrant/ssh.rb
veewee-0.3.1 lib/veewee/command/vagrant/ssh.rb
veewee-0.3.0.beta2 lib/veewee/command/vagrant/ssh.rb
veewee-0.3.0.beta1 lib/veewee/command/vagrant/ssh.rb
veewee-0.3.0.alpha9 lib/veewee/command/vagrant/ssh.rb
veewee-0.3.0.alpha8 lib/veewee/command/vagrant/ssh.rb