Check exec log flags compatibility

Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
This commit is contained in:
Maksym Pavlenko 2019-07-02 09:53:11 -07:00
parent 6b59b425e2
commit 46af8ccd2d

View File

@ -98,6 +98,15 @@ var execCommand = cli.Command{
if err != nil {
return err
}
if dir := context.String("fifo-dir"); dir != "" {
return errors.New("can't use log-uri with fifo-dir")
}
if tty {
return errors.New("can't use log-uri with tty")
}
ioCreator = cio.LogURI(uri)
} else {
cioOpts := []cio.Opt{cio.WithStdio, cio.WithFIFODir(context.String("fifo-dir"))}