commit
d3788f55f3
3 changed files with 13 additions and 1 deletions
|
@ -16,6 +16,15 @@ module Vagrant
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Raised when user interrupts a subprocess
|
||||||
|
class SubprocessInterruptError < Vagrant::Errors::VagrantError
|
||||||
|
error_key(:lxc_interrupt_error)
|
||||||
|
def initialize(message, *args)
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
class NamespacesNotSupported < Vagrant::Errors::VagrantError
|
class NamespacesNotSupported < Vagrant::Errors::VagrantError
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ module Vagrant
|
||||||
# nicely handled by Vagrant.
|
# nicely handled by Vagrant.
|
||||||
if r.exit_code != 0
|
if r.exit_code != 0
|
||||||
if @interrupted
|
if @interrupted
|
||||||
@logger.info("Exit code != 0, but interrupted. Ignoring.")
|
raise LXC::Errors::SubprocessInterruptError, command.inspect
|
||||||
else
|
else
|
||||||
raise LXC::Errors::ExecuteError,
|
raise LXC::Errors::ExecuteError,
|
||||||
command: command.inspect, stderr: r.stderr, stdout: r.stdout, exitcode: r.exit_code
|
command: command.inspect, stderr: r.stderr, stdout: r.stdout, exitcode: r.exit_code
|
||||||
|
|
|
@ -40,6 +40,9 @@ en:
|
||||||
preparing: Setting up mount entries for shared folders...
|
preparing: Setting up mount entries for shared folders...
|
||||||
|
|
||||||
errors:
|
errors:
|
||||||
|
lxc_interrupt_error: |-
|
||||||
|
Interrupted
|
||||||
|
|
||||||
lxc_execute_error: |-
|
lxc_execute_error: |-
|
||||||
There was an error executing %{command}
|
There was an error executing %{command}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue