1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-19 20:57:53 +02:00

ci: append envs when calling docker instead of overriding (#4187)

This is causing issues when trying to run tests in Dagger.
ref:
https://github.com/goreleaser/goreleaser/pull/4186#discussion_r1262977616

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
Marcos Nils 2023-07-13 21:22:47 -03:00 committed by GitHub
parent fdee23cae3
commit 789a4d45fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 = ctx.Env.Strings()
cmd.Env = append(cmd.Env, ctx.Env.Strings()...)
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 = ctx.Env.Strings()
cmd.Env = append(cmd.Env, ctx.Env.Strings()...)
var b bytes.Buffer
w := gio.Safe(&b)