Skip to content

Commit 8874d06

Browse files
committed
pass project.environment to bake
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 3553aa2 commit 8874d06

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

cmd/compose/exec.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package compose
1818

1919
import (
2020
"context"
21-
"fmt"
2221

2322
"github.com/compose-spec/compose-go/v2/types"
2423
"github.com/docker/cli/cli"
@@ -110,7 +109,7 @@ func runExec(ctx context.Context, dockerCli command.Cli, backend api.Service, op
110109

111110
exitCode, err := backend.Exec(ctx, projectName, execOpts)
112111
if exitCode != 0 {
113-
errMsg := fmt.Sprintf("exit status %d", exitCode)
112+
var errMsg string
114113
if err != nil && err.Error() != "" {
115114
errMsg = err.Error()
116115
}

pkg/compose/build_bake.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ func (s *composeService) doBuildBake(ctx context.Context, project *types.Project
295295

296296
cmd := exec.CommandContext(ctx, buildx.Path, args...)
297297
// Remove DOCKER_CLI_PLUGIN... variable so buildx can detect it run standalone
298-
cmd.Env = filter(os.Environ(), manager.ReexecEnvvar)
298+
cmd.Env = filter(project.Environment.Values(), manager.ReexecEnvvar)
299299

300300
// Use docker/cli mechanism to propagate termination signal to child process
301301
server, err := socket.NewPluginServer(nil)

0 commit comments

Comments
 (0)