mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
api/types/container: deprecate ExecOptions.Detach
This field was added in5130fe5d38, which added it for use as intermediate struct when parsing CLI flags (through `runconfig.ParseExec`) inc786a8ee5e. Commit9d9dff3d0drewrote the CLI to use Cobra, and as part of this introduced a separate `execOptions` type in `api/client/container`. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -18,11 +18,13 @@ type ExecOptions struct {
|
||||
AttachStdin bool // Attach the standard input, makes possible user interaction
|
||||
AttachStderr bool // Attach the standard error
|
||||
AttachStdout bool // Attach the standard output
|
||||
Detach bool // Execute in detach mode
|
||||
DetachKeys string // Escape keys for detach
|
||||
Env []string // Environment variables
|
||||
WorkingDir string // Working directory
|
||||
Cmd []string // Execution commands and args
|
||||
|
||||
// Deprecated: the Detach field is not used, and will be removed in a future release.
|
||||
Detach bool
|
||||
}
|
||||
|
||||
// ExecStartOptions is a temp struct used by execStart
|
||||
|
||||
@@ -127,9 +127,8 @@ func TestExecResize(t *testing.T) {
|
||||
cmd = []string{"sleep", "240"}
|
||||
}
|
||||
resp, err := apiClient.ContainerExecCreate(ctx, cID, containertypes.ExecOptions{
|
||||
Tty: true, // Windows requires a TTY for the resize to work, otherwise fails with "is not a tty: failed precondition", see https://github.com/moby/moby/pull/48665#issuecomment-2412530345
|
||||
Detach: true,
|
||||
Cmd: cmd,
|
||||
Tty: true, // Windows requires a TTY for the resize to work, otherwise fails with "is not a tty: failed precondition", see https://github.com/moby/moby/pull/48665#issuecomment-2412530345
|
||||
Cmd: cmd,
|
||||
})
|
||||
assert.NilError(t, err)
|
||||
execID := resp.ID
|
||||
|
||||
Reference in New Issue
Block a user