1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Better error on attach no tty

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard
2016-05-25 10:19:17 -07:00
parent 60abc96acf
commit f7541b00b0
4 changed files with 21 additions and 5 deletions

View File

@ -9,6 +9,7 @@ import (
"os"
"os/exec"
"reflect"
"runtime"
"sort"
"strings"
"sync"
@ -182,7 +183,10 @@ func (s *DockerSuite) TestExecTTYWithoutStdin(c *check.C) {
return
}
expected := "cannot enable tty mode"
expected := "the input device is not a TTY"
if runtime.GOOS == "windows" {
expected += ". If you are using mintty, try prefixing the command with 'winpty'"
}
if out, _, err := runCommandWithOutput(cmd); err == nil {
errChan <- fmt.Errorf("exec should have failed")
return