1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00

fix(docker): should use cmd.Environ() instead of cmd.Env

refs #4187
This commit is contained in:
Carlos Alexandro Becker 2023-07-17 02:26:48 +00:00
parent 551db3ac77
commit cbb09b89fd
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -48,7 +48,7 @@ func runCommand(ctx *context.Context, dir, binary string, args ...string) error
/* #nosec */
cmd := exec.CommandContext(ctx, binary, args...)
cmd.Dir = dir
cmd.Env = append(ctx.Env.Strings(), cmd.Env...)
cmd.Env = append(ctx.Env.Strings(), cmd.Environ()...)
var b bytes.Buffer
w := gio.Safe(&b)
@ -69,7 +69,7 @@ func runCommandWithOutput(ctx *context.Context, dir, binary string, args ...stri
/* #nosec */
cmd := exec.CommandContext(ctx, binary, args...)
cmd.Dir = dir
cmd.Env = append(ctx.Env.Strings(), cmd.Env...)
cmd.Env = append(ctx.Env.Strings(), cmd.Environ()...)
var b bytes.Buffer
w := gio.Safe(&b)