Sha256: b0504f4c3b6ff67055ed869d4881291ce024f6cfa96cccfceb6bb0ef7852c07a

Contents?: true

Size: 678 Bytes

Versions: 8

Compression:

Stored size: 678 Bytes

Contents

module Vagrant
  class Commands
    # Lists all added boxes
    module Box
      class List < BoxCommand
        BoxCommand.subcommand "list", self
        description "List all installed boxes"

        def execute(args=[])
          boxes = Vagrant::Box.all(env).sort

          wrap_output do
            if !boxes.empty?
              puts "Installed Vagrant Boxes:\n\n"
              boxes.each do |box|
                puts box
              end
            else
              puts "No Vagrant Boxes Added!"
            end
          end
        end

        def options_spec(opts)
          opts.banner = "Usage: vagrant box list"
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
vagrantup-0.5.4 lib/vagrant/commands/box/list.rb
vagrantup-0.5.3 lib/vagrant/commands/box/list.rb
vagrantup-0.5.2 lib/vagrant/commands/box/list.rb
vagrantup-0.5.1 lib/vagrant/commands/box/list.rb
vagrant-0.5.4 lib/vagrant/commands/box/list.rb
vagrant-0.5.3 lib/vagrant/commands/box/list.rb
vagrant-0.5.2 lib/vagrant/commands/box/list.rb
vagrant-0.5.1 lib/vagrant/commands/box/list.rb