代码拉取完成,页面将自动刷新
package provision
import (
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/ssh"
)
type RedHatSSHCommander struct {
Driver drivers.Driver
}
func (sshCmder RedHatSSHCommander) SSHCommand(args string) (string, error) {
client, err := drivers.GetSSHClientFromDriver(sshCmder.Driver)
if err != nil {
return "", err
}
// redhat needs "-t" for tty allocation on ssh therefore we check for the
// 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) {
case *ssh.ExternalClient:
c.BaseArgs = append(c.BaseArgs, "-tt")
client = c
case *ssh.NativeClient:
return c.OutputWithPty(args)
}
return client.Output(args)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。