vagrant status uses new MachineState results
This commit is contained in:
parent
f24dba0dc5
commit
8c4a7350fe
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue