Interrupt when asking to destroy a VM should exit. [GH-1017]
This commit is contained in:
parent
a34801588c
commit
2995b6439d
|
@ -36,6 +36,8 @@
|
||||||
- FIx issue where puppet would reorder module paths. [GH-964]
|
- FIx issue where puppet would reorder module paths. [GH-964]
|
||||||
- Human-friendly error is raised if there are permission issues when
|
- Human-friendly error is raised if there are permission issues when
|
||||||
using SCP to upload files. [GH-924]
|
using SCP to upload files. [GH-924]
|
||||||
|
- When console input is asked for (destroying a VM, bridged interfaces, etc.),
|
||||||
|
keystrokes such as ctrl-D and ctrl-C are more gracefully handled. [GH-1017]
|
||||||
|
|
||||||
## 1.0.3 (May 1, 2012)
|
## 1.0.3 (May 1, 2012)
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,10 @@ module VagrantPlugins
|
||||||
begin
|
begin
|
||||||
choice = @env.ui.ask(I18n.t("vagrant.commands.destroy.confirmation",
|
choice = @env.ui.ask(I18n.t("vagrant.commands.destroy.confirmation",
|
||||||
:name => vm.name))
|
:name => vm.name))
|
||||||
|
rescue Interrupt
|
||||||
|
# Ctrl-C was pressed (or SIGINT). We just exit immediately
|
||||||
|
# with a non-zero exit status.
|
||||||
|
return 1
|
||||||
rescue Vagrant::Errors::UIExpectsTTY
|
rescue Vagrant::Errors::UIExpectsTTY
|
||||||
# We raise a more specific error but one which basically
|
# We raise a more specific error but one which basically
|
||||||
# means the same thing.
|
# means the same thing.
|
||||||
|
|
Loading…
Reference in New Issue