From 37df5a2c61ff8e954fb91fb9a241e7783e96da4f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 17 Jun 2025 13:53:49 +0200 Subject: [PATCH] pkg/compose: remove uses of ExecOptions.Detach This field was added in [moby@5130fe5d38837302e], which added it for use as intermediate struct when parsing CLI flags (through `runconfig.ParseExec`) in [moby@c786a8ee5e9db8f5f]. Commit [moby@9d9dff3d0d9e92adf] rewrote the CLI to use Cobra, and as part of this introduced a separate `execOptions` type in `api/client/container`, however the ExecOptions.Detach field was still used as intermediate field to store the flag's value. Given that the client doesn't use this field, let's remove its use to prevent giving the impression that it's used anywhere. [moby@5130fe5d38837302e]: https://github.com/docker/docker/commit/5130fe5d38837302e72bdc5e4bd1f5fa1df72c7f [moby@c786a8ee5e9db8f5f]: https://github.com/docker/docker/commit/c786a8ee5e9db8f5f609cf8721bd1e1513fb0043 [moby@9d9dff3d0d9e92adf]: https://github.com/docker/docker/commit/9d9dff3d0d9e92adf7c2e59f94c63766659d1d47 Signed-off-by: Sebastiaan van Stijn --- pkg/compose/hook.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/compose/hook.go b/pkg/compose/hook.go index 79831d5b03f..6bd3f84bf93 100644 --- a/pkg/compose/hook.go +++ b/pkg/compose/hook.go @@ -48,7 +48,6 @@ func (s composeService) runHook(ctx context.Context, ctr container.Summary, serv Env: ToMobyEnv(hook.Environment), WorkingDir: hook.WorkingDir, Cmd: hook.Command, - Detach: detached, AttachStdout: !detached, AttachStderr: !detached, })