From d994e980de2a090c1f3ff6956d91c68e7b86b4cb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 14 Oct 2010 14:00:48 -0700 Subject: [PATCH] `vagrant status NAME` works again. [closes GH-191] --- CHANGELOG.md | 1 + lib/vagrant/command/status.rb | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c18870fd1..9559d52be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/lib/vagrant/command/status.rb b/lib/vagrant/command/status.rb index b53359acb..ed3eb1873 100644 --- a/lib/vagrant/command/status.rb +++ b/lib/vagrant/command/status.rb @@ -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"),