Merge pull request #1676 from AkihiroSuda/null-io-fix

ctr: error if tty && nullIO
This commit is contained in:
Michael Crosby
2017-10-30 10:10:22 -04:00
committed by GitHub
2 changed files with 7 additions and 0 deletions

View File

@@ -124,6 +124,9 @@ func newTask(ctx gocontext.Context, client *containerd.Client, container contain
io = containerd.StdioTerminal
}
if nullIO {
if tty {
return nil, errors.New("tty and null-io cannot be used together")
}
io = containerd.NullIO
}
return container.NewTask(ctx, io)