lima-vm / lima-vm/lima

lima nerdctl crash when using pipe |

Open
#1,012 2 comments 0 reactions 0 assignees View on GitHub
component/nerdctl kind/external
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

### Description

lima nerdctl command crashes when I use a pipe | to redirect container output.

## Issue
```shell
lima nerdctl run --rm -it bash -- echo test | grep test
panic: provided file is not a console

goroutine 1 [running]:
github.com/containerd/console.Current()
/go/pkg/mod/github.com/containerd/console@v1.0.3/console.go:77 +0xa5
main.runAction(0xc0001e0c80, {0xc00058b480, 0x4, 0x8})
/go/src/github.com/containerd/nerdctl/cmd/nerdctl/run.go:324 +0x42c
github.com/spf13/cobra.(*Command).execute(0xc0001e0c80, {0xc00013a020, 0x8, 0x8})
/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001e0500)
/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
main.xmain()
/go/src/github.com/containerd/nerdctl/cmd/nerdctl/main.go:84 +0x9f
main.main()
/go/src/github.com/containerd/nerdctl/cmd/nerdctl/main.go:67 +0x19
```

## env
OS: mac OS 12.5
Shell: zsh and bash
limactl version 0.11.3

## workaround
use limactl shell default

```shell
limactl shell default
$ nerdctl run --rm -it bash -- echo test | grep test
test
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.