Error properly if an invalid VM name is given
This commit is contained in:
parent
709c50e7b6
commit
dec46235cb
|
@ -46,7 +46,7 @@ module Vagrant
|
|||
else
|
||||
# Try to get the vm based on the name. If the specified VM
|
||||
# doesn't exist, then error saying so
|
||||
vm = env.vms[vm.to_sym]
|
||||
vm = env.vms[vm.to_sym] || error_and_exit(:unknown_vm, :vm => vm)
|
||||
end
|
||||
|
||||
show_single(vm)
|
||||
|
|
|
@ -154,6 +154,8 @@
|
|||
:system_unspecified: |-
|
||||
A VM system type must be specified! This is done via the `config.vm.system`
|
||||
configuration value. Please read the documentation online for more information.
|
||||
:unknown_vm: |-
|
||||
The specified VM could not be found: <%= vm %>
|
||||
:virtualbox_import_failure: |-
|
||||
The VM import failed! Try running `VBoxManage import` on the box file
|
||||
manually for more verbose error output.
|
||||
|
|
Loading…
Reference in New Issue