未验证 提交 7ab632a0 编写于 作者: M Medya Gh

add qutation mark

上级 a4d9a5bc
......@@ -862,13 +862,13 @@ func validateSSHCmd(ctx context.Context, t *testing.T, profile string) {
var rr *RunResult
var err error
if runtime.GOOS == "windows" { // golang exec powershell needs some tricks !
cmd := exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "cat /etc/hostname")
cmd := exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "\"cat /etc/hostname\"")
t.Logf("about to run %s: ", cmd.Args)
rr, err = Run(t, cmd, true)
t.Logf("rr is %+v: \n", rr)
t.Logf("err is %v: \n", err)
} else {
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "\"cat /etc/hostname\""))
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "cat /etc/hostname"))
}
if ctx.Err() == context.DeadlineExceeded {
t.Logf("failed to run command by deadline. exceeded timeout : %s", rr.Command())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册