mirror of https://github.com/docker/buildx.git
test: fix missing envs when cleaning up some workers
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
056cf8a7ca
commit
df0270d0cc
|
@ -73,6 +73,11 @@ func (w *containerWorker) New(ctx context.Context, cfg *integration.BackendConfi
|
|||
|
||||
cl := func() error {
|
||||
cmd := exec.Command("buildx", "rm", "-f", name)
|
||||
cmd.Env = append(
|
||||
os.Environ(),
|
||||
"BUILDX_CONFIG=/tmp/buildx-"+name,
|
||||
"DOCKER_CONTEXT="+w.docker.DockerAddress(),
|
||||
)
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ func (w remoteWorker) New(ctx context.Context, cfg *integration.BackendConfig) (
|
|||
cl = func() error {
|
||||
err := bkclose()
|
||||
cmd := exec.Command("buildx", "rm", "-f", name)
|
||||
cmd.Env = append(os.Environ(), "BUILDX_CONFIG=/tmp/buildx-"+name)
|
||||
if err1 := cmd.Run(); err == nil {
|
||||
err = err1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue