Skip to content

Commit 46af8cc

Browse files
committed
Check exec log flags compatibility
Signed-off-by: Maksym Pavlenko <[email protected]>
1 parent 6b59b42 commit 46af8cc

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cmd/ctr/commands/tasks/exec.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ var execCommand = cli.Command{
9898
if err != nil {
9999
return err
100100
}
101+
102+
if dir := context.String("fifo-dir"); dir != "" {
103+
return errors.New("can't use log-uri with fifo-dir")
104+
}
105+
106+
if tty {
107+
return errors.New("can't use log-uri with tty")
108+
}
109+
101110
ioCreator = cio.LogURI(uri)
102111
} else {
103112
cioOpts := []cio.Opt{cio.WithStdio, cio.WithFIFODir(context.String("fifo-dir"))}

0 commit comments

Comments
 (0)