diff --git a/pkg/cmd/container/exec.go b/pkg/cmd/container/exec.go index c00c776998b..592a304ab8c 100644 --- a/pkg/cmd/container/exec.go +++ b/pkg/cmd/container/exec.go @@ -133,13 +133,10 @@ func execActionWithContainer(ctx context.Context, client *containerd.Client, con return nil } status := <-statusC - code, _, err := status.Result() + _, _, err = status.Result() if err != nil { return err } - if code != 0 { - return fmt.Errorf("exec failed with exit code %d", code) - } return nil }