Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: lucklove <[email protected]>
  • Loading branch information
lucklove committed Jul 23, 2020
1 parent 2882ee5 commit c5feef7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pkg/cluster/executor/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ func NewSSHExecutor(c SSHConfig, sudo bool, native bool) Executor {
Locale: "C",
Sudo: sudo,
}
_, _, e.ConnectionTestResult = e.Execute(connectionTestCommand, false, c.Timeout)
if c.Password != "" || (c.KeyFile != "" && c.Passphrase != "") {
_, _, e.ConnectionTestResult = e.Execute(connectionTestCommand, false, executeDefaultTimeout)
}
return e
}

Expand Down
5 changes: 3 additions & 2 deletions pkg/exec/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/fatih/color"
"math"
"os"
"os/exec"
Expand All @@ -28,6 +27,8 @@ import (
"syscall"
"time"

"github.com/fatih/color"

"github.com/pingcap/errors"
"github.com/pingcap/tiup/pkg/environment"
"github.com/pingcap/tiup/pkg/localdata"
Expand Down Expand Up @@ -247,7 +248,7 @@ func launchComponent(ctx context.Context, component string, version v0manifest.V
p := &localdata.Process{
Component: component,
CreatedTime: time.Now().Format(time.RFC3339),
Exec: binPath,
Exec: c.Args[0],
Args: args,
Dir: c.Dir,
Env: c.Env,
Expand Down

0 comments on commit c5feef7

Please sign in to comment.