Sha256: 43d574943749f5b4ccd61916952d1de9d8ad8ddbd2b1b91b7e67c2b653d9d2d9

Contents?: true

Size: 545 Bytes

Versions: 15

Compression:

Stored size: 545 Bytes

Contents

require 'optparse'

module Vagrant
  module Command
    class BoxRemove < Base
      def execute
        options = {}

        opts = OptionParser.new do |opts|
          opts.banner = "Usage: vagrant box remove <name>"
        end

        # Parse the options
        argv = parse_options(opts)
        return if !argv
        raise Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1

        b = @env.boxes.find(argv[0])
        raise Errors::BoxNotFound, :name => argv[0] if !b
        b.destroy
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
vagrantup-1.0.1 lib/vagrant/command/box_remove.rb
vagrantup-1.0.0 lib/vagrant/command/box_remove.rb
vagrantup-0.9.99.2 lib/vagrant/command/box_remove.rb
vagrantup-0.9.99.1 lib/vagrant/command/box_remove.rb
vagrantup-0.9.7 lib/vagrant/command/box_remove.rb
vagrantup-0.9.6 lib/vagrant/command/box_remove.rb
vagrantup-0.9.5 lib/vagrant/command/box_remove.rb
vagrantup-0.9.4 lib/vagrant/command/box_remove.rb
vagrantup-0.9.3 lib/vagrant/command/box_remove.rb
vagrant-1.0.1 lib/vagrant/command/box_remove.rb
vagrant-1.0.0 lib/vagrant/command/box_remove.rb
vagrant-0.9.7 lib/vagrant/command/box_remove.rb
vagrant-0.9.5 lib/vagrant/command/box_remove.rb
vagrant-0.9.4 lib/vagrant/command/box_remove.rb
vagrant-0.9.3 lib/vagrant/command/box_remove.rb