From d565c2f07eb5b520ddf5f5ccd2b9882e62f9eedb Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 17 Mar 2016 10:52:10 -0400 Subject: [PATCH] Check both stderr and stdout Different vbox versions print this to different streams, so check both just to be sure --- plugins/providers/virtualbox/driver/version_4_1.rb | 3 ++- plugins/providers/virtualbox/driver/version_4_2.rb | 3 ++- plugins/providers/virtualbox/driver/version_4_3.rb | 3 ++- plugins/providers/virtualbox/driver/version_5_0.rb | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/providers/virtualbox/driver/version_4_1.rb b/plugins/providers/virtualbox/driver/version_4_1.rb index 42ed91fa8..3ec3c0ee9 100644 --- a/plugins/providers/virtualbox/driver/version_4_1.rb +++ b/plugins/providers/virtualbox/driver/version_4_1.rb @@ -129,7 +129,8 @@ module VagrantPlugins result.sort rescue Vagrant::Errors::VBoxManageError => e - return [] if e.extra_data[:stderr].include?("does not have") + d = e.extra_data + return [] if d[:stderr].include?("does not have") || d[:stdout].include?("does not have") raise end diff --git a/plugins/providers/virtualbox/driver/version_4_2.rb b/plugins/providers/virtualbox/driver/version_4_2.rb index b3f33f110..a0a18d98d 100644 --- a/plugins/providers/virtualbox/driver/version_4_2.rb +++ b/plugins/providers/virtualbox/driver/version_4_2.rb @@ -656,7 +656,8 @@ module VagrantPlugins result.sort rescue Vagrant::Errors::VBoxManageError => e - return [] if e.extra_data[:stdout].include?("does not have") + d = e.extra_data + return [] if d[:stderr].include?("does not have") || d[:stdout].include?("does not have") raise end diff --git a/plugins/providers/virtualbox/driver/version_4_3.rb b/plugins/providers/virtualbox/driver/version_4_3.rb index b77b2a4f9..66c06f93f 100644 --- a/plugins/providers/virtualbox/driver/version_4_3.rb +++ b/plugins/providers/virtualbox/driver/version_4_3.rb @@ -135,7 +135,8 @@ module VagrantPlugins result.sort rescue Vagrant::Errors::VBoxManageError => e - return [] if e.extra_data[:stdout].include?("does not have") + d = e.extra_data + return [] if d[:stderr].include?("does not have") || d[:stdout].include?("does not have") raise end diff --git a/plugins/providers/virtualbox/driver/version_5_0.rb b/plugins/providers/virtualbox/driver/version_5_0.rb index 75a71c4f1..961f5ad55 100644 --- a/plugins/providers/virtualbox/driver/version_5_0.rb +++ b/plugins/providers/virtualbox/driver/version_5_0.rb @@ -131,7 +131,8 @@ module VagrantPlugins result.sort rescue Vagrant::Errors::VBoxManageError => e - return [] if e.extra_data[:stdout].include?("does not have") + d = e.extra_data + return [] if d[:stderr].include?("does not have") || d[:stdout].include?("does not have") raise end