lib/veewee/provider/virtualbox/box/helper/version.rb in veewee-0.3.7 vs lib/veewee/provider/virtualbox/box/helper/version.rb in veewee-0.3.9

- old
+ new

@@ -6,10 +6,13 @@ # Return the major/minor/incremental version of VirtualBox. # For example: 4.1.8_Debianr75467 -> 4.1.8 def vbox_version command="#{@vboxcmd} --version" - shell_results=shell_exec("#{command}",{:mute => true}) + stderr = "/dev/null" + is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/) + stderr = "nul" if is_windows + shell_results=shell_exec("#{command}",{:mute => true, :stderr => stderr}) version=shell_results.stdout.strip.split(/[^0-9\.]/)[0] return version end def vboxga_version