Reduce the number of IO constructors

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin
2017-12-07 14:09:08 -05:00
parent a901091f7c
commit 7d4337e738
9 changed files with 171 additions and 139 deletions

View File

@@ -60,9 +60,9 @@ var execCommand = cli.Command{
pspec.Terminal = tty
pspec.Args = args
ioCreator := cio.Stdio
ioCreator := cio.NewCreator(cio.WithStdio)
if tty {
ioCreator = cio.StdioTerminal
ioCreator = cio.NewCreator(cio.WithStdio, cio.WithTerminal)
}
process, err := task.Exec(ctx, context.String("exec-id"), pspec, ioCreator)
if err != nil {