lib/vagrant/driver/virtualbox_base.rb in vagrant-0.9.3 vs lib/vagrant/driver/virtualbox_base.rb in vagrant-0.9.4
- old
+ new
@@ -131,13 +131,12 @@
end
# Imports the VM from an OVF file.
#
# @param [String] ovf Path to the OVF file.
- # @param [String] name Name of the VM.
# @return [String] UUID of the imported VM.
- def import(ovf, name)
+ def import(ovf)
end
# Returns a list of forwarded ports for a VM.
#
# @param [String] uuid UUID of the VM to read from, or `nil` if this
@@ -257,9 +256,17 @@
# nicely handled by Vagrant.
if r.exit_code != 0
if @interrupted
@logger.info("Exit code != 0, but interrupted. Ignoring.")
else
+ raise Errors::VBoxManageError, :command => command.inspect
+ end
+ else
+ # Sometimes, VBoxManage fails but doesn't actual return a non-zero
+ # exit code. For this we inspect the output and determine if an error
+ # occurred.
+ if r.stderr =~ /VBoxManage: error:/
+ @logger.info("VBoxManage error text found, assuming error.")
raise Errors::VBoxManageError, :command => command.inspect
end
end
# Return the output, making sure to replace any Windows-style