lib/veewee/provider/vmfusion/provider.rb in veewee-0.3.1 vs lib/veewee/provider/vmfusion/provider.rb in veewee-0.3.2
- old
+ new
@@ -25,10 +25,16 @@
shell_results = shell_exec("system_profiler SPApplicationsDataType")
env.logger.info("Checking version by querying the system_profiler")
env.logger.debug(shell_results.stdout)
- version = shell_results.stdout.split(/VMware/)[1].split(/\n/)[2].split(/:/)[1].strip
+ if (shell_results.stdout == "")
+ ui.warn "Could not detect the exact version of vmware. assuming 5.1"
+ version = "5.1"
+ else
+ version = shell_results.stdout.split(/VMware/)[1].split(/\n/)[2].split(/:/)[1].strip
+ end
+
return version
end
end #End Class
end # End Module