Merge pull request #14919 from klaases/qemu-const1
fix defaultSSHUser and string formatspull/14934/head
commit
d70d10eef3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue