Merge pull request #14919 from klaases/qemu-const1

fix defaultSSHUser and string formats
pull/14934/head
Steven Powell 2022-09-08 10:41:46 -07:00 committed by GitHub
commit d70d10eef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)