vagrant status uses new MachineState results

This commit is contained in:
Mitchell Hashimoto 2013-01-21 11:35:46 -06:00
parent f24dba0dc5
commit 8c4a7350fe
2 changed files with 5 additions and 5 deletions

View File

@ -15,15 +15,15 @@ module VagrantPlugins
state = nil
results = []
with_target_vms(argv) do |machine|
state = machine.state.to_s if !state
results << "#{machine.name.to_s.ljust(25)}#{machine.state.to_s.gsub("_", " ")}"
state = machine.state if !state
results << "#{machine.name.to_s.ljust(25)}#{machine.state.short_description}"
end
state = results.length == 1 ? state : "listing"
@env.ui.info(I18n.t("vagrant.commands.status.output",
:states => results.join("\n"),
:message => I18n.t("vagrant.commands.status.#{state}")),
:message => state.long_description),
:prefix => false)
# Success, exit status 0

View File

@ -71,8 +71,8 @@ module VagrantPlugins
state_id = :unknown if !state_id
# Translate into short/long descriptions
short = state_id.to_s
long = I18n.t("vagrant.commands.state.#{state_id}")
short = state_id.to_s.gsub("_", " ")
long = I18n.t("vagrant.commands.status.#{state_id}")
# Return the state
Vagrant::MachineState.new(state_id, short, long)