Skip to content

Commit 321f4f9

Browse files
authored
chore(exec): remove uses of ExecOptions.Detach (#3211)
* chore: exec: remove uses of ExecOptions.Detach This option is not actually used by the client, and not handled by the API, so removing its use. Signed-off-by: Sebastiaan van Stijn <[email protected]> * chore: modules/ollama: remove uses of ExecOptions.Detach This option is not actually used by the client, and not handled by the API, and is planned to be removed in a future release so removing its use. Signed-off-by: Sebastiaan van Stijn <[email protected]> --------- Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 4a7770b commit 321f4f9

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

exec/processor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ func NewProcessOptions(cmd []string) *ProcessOptions {
2525
return &ProcessOptions{
2626
ExecConfig: container.ExecOptions{
2727
Cmd: cmd,
28-
Detach: false,
2928
AttachStdout: true,
3029
AttachStderr: true,
3130
},

modules/ollama/local.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,6 @@ func (c *localProcess) validateExecOptions(options container.ExecOptions) error
408408
if options.Tty {
409409
errs = append(errs, fmt.Errorf("tty: %w", errors.ErrUnsupported))
410410
}
411-
if options.Detach {
412-
errs = append(errs, fmt.Errorf("detach: %w", errors.ErrUnsupported))
413-
}
414411
if options.DetachKeys != "" {
415412
errs = append(errs, fmt.Errorf("detach keys: %w", errors.ErrUnsupported))
416413
}

modules/ollama/local_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -483,15 +483,6 @@ func TestRun_localExec(t *testing.T) {
483483
require.Nil(t, r)
484484
})
485485

486-
t.Run("unsupported-option-detach", func(t *testing.T) {
487-
code, r, err := ollamaContainer.Exec(ctx, []string{testBinary, "-v"}, tcexec.ProcessOptionFunc(func(opts *tcexec.ProcessOptions) {
488-
opts.ExecConfig.Detach = true
489-
}))
490-
require.ErrorIs(t, err, errors.ErrUnsupported)
491-
require.Equal(t, 1, code)
492-
require.Nil(t, r)
493-
})
494-
495486
t.Run("unsupported-option-detach-keys", func(t *testing.T) {
496487
code, r, err := ollamaContainer.Exec(ctx, []string{testBinary, "-v"}, tcexec.ProcessOptionFunc(func(opts *tcexec.ProcessOptions) {
497488
opts.ExecConfig.DetachKeys = "ctrl-p,ctrl-q"

0 commit comments

Comments
 (0)