Fix for problem where the host_info.ps1 script returns a string instead of a list of IPs

This commit is contained in:
Tony Arkles 2015-12-17 14:40:50 -06:00
parent 811f21938a
commit 795a7a3d23
1 changed files with 6 additions and 1 deletions

View File

@ -155,7 +155,12 @@ module VagrantPlugins
stderr: r.stderr
end
JSON.parse(r.stdout)["ip_addresses"]
res = JSON.parse(r.stdout)["ip_addresses"]
if res.instance_of? String
[ res ]
else
res
end
end
end
end