// https://rosettacode.org/wiki/Check_output_device_is_a_terminal#Go
// If output is a terminal...
if terminal.IsTerminal(int(os.Stdout.Fd())) {
// use user's preference for interactive/nonInteractive Docker
docker.NonInteractive = nonInteractive
} else {
// If not, then default to nonInteractive
docker.NonInteractive = true
}
At this point, there's (probably) no need for the -N flag.
Example code from pscli:
At this point, there's (probably) no need for the
-N
flag.