fix: avoid race condition by not running exec/start twice

This commit is contained in:
Daniel A 2024-04-22 19:23:01 +00:00
parent 76f9cea516
commit 9505cd5d4a
2 changed files with 0 additions and 16 deletions

View file

@ -463,13 +463,6 @@ func (client dockerClient) ExecuteCommand(containerID t.ContainerID, command str
clog.Errorf("Failed to extract command exec logs: %v", attachErr)
}
// Run the exec
execStartCheck := types.ExecStartCheck{Detach: false, Tty: true}
err = client.api.ContainerExecStart(bg, exec.ID, execStartCheck)
if err != nil {
return false, err
}
var output string
if attachErr == nil {
defer response.Close()