diff --git a/pkg/runtimes/docker/node.go b/pkg/runtimes/docker/node.go index cefd2b4f..27867e05 100644 --- a/pkg/runtimes/docker/node.go +++ b/pkg/runtimes/docker/node.go @@ -308,7 +308,7 @@ func (d Docker) GetNodeLogs(ctx context.Context, node *k3d.Node, since time.Time func (d Docker) ExecInNodeGetLogs(ctx context.Context, node *k3d.Node, cmd []string) (*bufio.Reader, error) { resp, err := executeInNode(ctx, node, cmd) if err != nil { - if resp.Reader != nil { // sometimes the exec process returns with a non-zero exit code, but we still have the logs we + if resp != nil && resp.Reader != nil { // sometimes the exec process returns with a non-zero exit code, but we still have the logs we return resp.Reader, err } return nil, err