diff --git a/go.mod b/go.mod index d00fa96..0ba7c4b 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,6 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect + golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2 // indirect google.golang.org/protobuf v1.28.1 // indirect ) diff --git a/go.sum b/go.sum index 93c5c01..b68b5a2 100644 --- a/go.sum +++ b/go.sum @@ -42,8 +42,8 @@ go.uber.org/zap v1.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2 h1:fqTvyMIIj+HRzMmnzr9NtpHP6uVpvB5fkHcgPDC4nu8= +golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= diff --git a/process.go b/process.go index 855ad50..0e9f9ca 100644 --- a/process.go +++ b/process.go @@ -147,7 +147,7 @@ func (p *Process) setEnv(e Env) []string { env := make([]string, 0, len(os.Environ())+len(e)) env = append(env, os.Environ()...) for k, v := range e { - env = append(env, fmt.Sprintf("%s=%s", k, os.Expand(v, os.Getenv))) + env = append(env, fmt.Sprintf("%s=%s", strings.ToUpper(k), os.Expand(v, os.Getenv))) } return env } diff --git a/process_test.go b/process_test.go index 2a92489..bc924f0 100644 --- a/process_test.go +++ b/process_test.go @@ -14,11 +14,11 @@ func TestSetEnv(t *testing.T) { val := out[len(out)-1] val2 := out[len(out)-2] - if val != "bar=baz" && val != "foo=bar" { + if val != "BAR=baz" && val != "FOO=bar" { t.Fail() } - if val2 != "bar=baz" && val2 != "foo=bar" { + if val2 != "BAR=baz" && val2 != "FOO=bar" { t.Fail() } }