mirror of https://github.com/docker/docs.git
Merge pull request #2056 from xiaohui/force-tty-allocation
force tty allocation for ssh with multiple '-tt'.
This commit is contained in:
commit
f6bbbdce7f
|
@ -73,10 +73,12 @@ func (provisioner *RedHatProvisioner) SSHCommand(args string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// redhat needs "-t" for tty allocation on ssh therefore we check for the
|
// redhat needs "-t" for tty allocation on ssh therefore we check for the
|
||||||
// external client and add as needed
|
// external client and add as needed.
|
||||||
|
// Note: CentOS 7.0 needs multiple "-tt" to force tty allocation when ssh has
|
||||||
|
// no local tty.
|
||||||
switch c := client.(type) {
|
switch c := client.(type) {
|
||||||
case ssh.ExternalClient:
|
case ssh.ExternalClient:
|
||||||
c.BaseArgs = append(c.BaseArgs, "-t")
|
c.BaseArgs = append(c.BaseArgs, "-tt")
|
||||||
client = c
|
client = c
|
||||||
case ssh.NativeClient:
|
case ssh.NativeClient:
|
||||||
return c.OutputWithPty(args)
|
return c.OutputWithPty(args)
|
||||||
|
|
Loading…
Reference in New Issue