lib/veewee/provider/vmfusion/provider.rb in veewee-0.4.0 vs lib/veewee/provider/vmfusion/provider.rb in veewee-0.4.1
- old
+ new
@@ -20,15 +20,15 @@
env.logger.info("Found fusion version: #{fusion_version}")
end
def fusion_version
# We ask the system profiler for all installed software
- shell_results = shell_exec("system_profiler SPApplicationsDataType")
+ shell_results = shell_exec("system_profiler SPApplicationsDataType", :external_encoding => Encoding::UTF_8)
env.logger.info("Checking version by querying the system_profiler")
env.logger.debug(shell_results.stdout)
- if (shell_results.stdout == "")
+ 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