Merge pull request #31211 from lixiaobing10051267/masterAttach

invalide detach keys provided
Upstream-commit: ffc70d2f0c2d8552d67e9af0e1a645abf04ca0e2
Component: engine
This commit is contained in:
Lei Jitang
2017-02-22 11:28:15 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ func (daemon *Daemon) ContainerAttach(prefixOrName string, c *backend.ContainerA
if c.DetachKeys != "" {
keys, err = term.ToBytes(c.DetachKeys)
if err != nil {
return fmt.Errorf("Invalid escape keys (%s) provided", c.DetachKeys)
return fmt.Errorf("Invalid detach keys (%s) provided", c.DetachKeys)
}
}

View File

@ -229,7 +229,7 @@ func (s *DockerSuite) TestRunAttachDetachFromInvalidFlag(c *check.C) {
c.Fatal(err)
}
// it should print a warning to indicate the detach key flag is invalid
errStr := "Invalid escape keys (ctrl-A,a) provided"
errStr := "Invalid detach keys (ctrl-A,a) provided"
c.Assert(strings.TrimSpace(out), checker.Equals, errStr)
}