core: only output error on batch action if not forked

This commit is contained in:
Mitchell Hashimoto 2014-04-20 09:07:49 -07:00
parent 4ced49bf0d
commit ee99f42e45
1 changed files with 7 additions and 3 deletions

View File

@ -90,10 +90,14 @@ module Vagrant
# Store the exception that will be processed later
Thread.current[:error] = e
# We can only do the things below if we do not fork, otherwise
# it'll hang the process.
if Process.pid == start_pid
# Let the user know that this process had an error early
# so that they see it while other things are happening.
machine.ui.error(I18n.t("vagrant.general.batch_notify_error"))
end
end
# If we forked during the process run, we need to do a hard
# exit here. Ruby's fork only copies the running process (which