Commit cf0ac15e authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: force LANG=C for ifconfig [GH-592]

parent 6c19ba62
......@@ -22,6 +22,7 @@ BUG FIXES:
[GH-554]
* builder/openstack: Properly scrub password from logs [GH-554]
* builder/virtualbox: No panic if SSH host port min/max is the same. [GH-594]
* builder/vmware: Host IP lookup works for non-C locales. [GH-592]
* common/uuid: Use cryptographically secure PRNG when generating
UUIDs. [GH-552]
* communicator/ssh: File uploads that exceed the size of memory no longer
......
......@@ -21,6 +21,12 @@ func (f *IfconfigIPFinder) HostIP() (string, error) {
stdout := new(bytes.Buffer)
cmd := exec.Command(ifconfigPath, f.Device)
cmd.Env = append(cmd.Env, os.Environ()...)
// Force LANG=C so that the output is what we expect it to be
// despite the locale.
cmd.Env = append(cmd.Env, "LANG=C")
cmd.Stdout = stdout
cmd.Stderr = new(bytes.Buffer)
if err := cmd.Run(); err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment