`vagrant status NAME` works again. [closes GH-191]

This commit is contained in:
Mitchell Hashimoto 2010-10-14 14:00:48 -07:00
parent 39407694e3
commit d994e980de
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,6 @@
## 0.6.6 (unreleased)
- `vagrant status NAME` works once again. [GH-191]
- Conditional validation of Vagrantfile so that some commands don't validate. [GH-188]
- Fix "junk" output for ssh-config. [GH-189]
- Fix port collision handling with greater than two VMs. [GH-185]

View File

@ -1,17 +1,16 @@
module Vagrant
module Command
class StatusCommand < Base
argument :name, :type => :string, :optional => true
class StatusCommand < NamedBase
register "status", "Shows the status of the current Vagrant environment."
def route
state = nil
results = env.vms.collect do |name, vm|
results = target_vms.collect do |vm|
state ||= vm.created? ? vm.vm.state.to_s : "not_created"
"#{name.to_s.ljust(25)}#{state.gsub("_", " ")}"
"#{vm.name.to_s.ljust(25)}#{state.gsub("_", " ")}"
end
state = env.vms.length == 1 ? state : "listing"
state = target_vms.length == 1 ? state : "listing"
env.ui.info(I18n.t("vagrant.commands.status.output",
:states => results.join("\n"),