fix defaultSSHUser and string formats

pull/14919/head
klaases 2022-09-07 15:00:14 -07:00
parent 8d0cd99fb7
commit 536e17360e
1 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ func (d *Driver) GetSSHPort() (int, error) {
func (d *Driver) GetSSHUsername() string {
if d.SSHUser == "" {
d.SSHUser = "docker"
d.SSHUser = defaultSSHUser
}
return d.SSHUser
}
@ -457,7 +457,7 @@ func (d *Driver) Start() error {
func cmdOutErr(cmdStr string, args ...string) (string, string, error) {
cmd := exec.Command(cmdStr, args...)
log.Debugf("executing: %v %v", cmdStr, strings.Join(args, " "))
log.Debugf("executing: %s %s", cmdStr, strings.Join(args, " "))
var stdout bytes.Buffer
var stderr bytes.Buffer
cmd.Stdout = &stdout
@ -465,8 +465,8 @@ func cmdOutErr(cmdStr string, args ...string) (string, string, error) {
err := cmd.Run()
stdoutStr := stdout.String()
stderrStr := stderr.String()
log.Debugf("STDOUT: %v", stdoutStr)
log.Debugf("STDERR: %v", stderrStr)
log.Debugf("STDOUT: %s", stdoutStr)
log.Debugf("STDERR: %s", stderrStr)
if err != nil {
if ee, ok := err.(*exec.Error); ok && ee == exec.ErrNotFound {
err = fmt.Errorf("mystery error: %v", ee)