Skip to content

Commit

Permalink
fix: Correctly demultiplex sandbox Docker exec output (flyteorg#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianoKF authored Nov 10, 2021
1 parent c3461e9 commit 32a6ded
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/docker/docker_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/mount"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/go-connections/nat"
"github.com/enescakir/emoji"
cmdUtil "github.com/flyteorg/flytectl/pkg/commandutils"
Expand Down Expand Up @@ -174,9 +175,9 @@ func InspectExecResp(ctx context.Context, cli Docker, containerID string) error
if err != nil {
return err
}
s := bufio.NewScanner(resp.Reader)
for s.Scan() {
fmt.Println(s.Text())
_, err = stdcopy.StdCopy(os.Stdout, os.Stderr, resp.Reader)
if err != nil {
return err
}
return nil
}
Expand Down

0 comments on commit 32a6ded

Please sign in to comment.