builder/vmware: force LANG=C for ifconfig [GH-592]
This commit is contained in:
parent
6c19ba621f
commit
cf0ac15ecc
|
@ -22,6 +22,7 @@ BUG FIXES:
|
||||||
[GH-554]
|
[GH-554]
|
||||||
* builder/openstack: Properly scrub password from logs [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/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
|
* common/uuid: Use cryptographically secure PRNG when generating
|
||||||
UUIDs. [GH-552]
|
UUIDs. [GH-552]
|
||||||
* communicator/ssh: File uploads that exceed the size of memory no longer
|
* 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)
|
stdout := new(bytes.Buffer)
|
||||||
|
|
||||||
cmd := exec.Command(ifconfigPath, f.Device)
|
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.Stdout = stdout
|
||||||
cmd.Stderr = new(bytes.Buffer)
|
cmd.Stderr = new(bytes.Buffer)
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue