Skip to content

Commit

Permalink
fix the logs after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
medyagh committed Oct 29, 2019
1 parent 27799f3 commit ed491fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ require (
github.com/juju/testing v0.0.0-20190723135506-ce30eb24acd2 // indirect
github.com/juju/utils v0.0.0-20180820210520-bf9cc5bdd62d // indirect
github.com/juju/version v0.0.0-20180108022336-b64dbd566305 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/libvirt/libvirt-go v3.4.0+incompatible
github.com/machine-drivers/docker-machine-driver-vmware v0.1.1
github.com/mattn/go-isatty v0.0.8
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ github.com/juju/version v0.0.0-20180108022336-b64dbd566305 h1:lQxPJ1URr2fjsKnJRt
github.com/juju/version v0.0.0-20180108022336-b64dbd566305/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U=
github.com/kardianos/osext v0.0.0-20150410034420-8fef92e41e22/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand Down
5 changes: 3 additions & 2 deletions pkg/minikube/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"strings"

"github.com/golang/glog"
"github.com/kballard/go-shellquote"
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/bootstrapper"
"k8s.io/minikube/pkg/minikube/command"
Expand Down Expand Up @@ -91,7 +92,7 @@ func FindProblems(r cruntime.Manager, bs bootstrapper.Bootstrapper, cr logRunner
for name := range cmds {
glog.Infof("Gathering logs for %s ...", name)
var b bytes.Buffer
c := exec.Command("/bin/bash", "-c", cmds[name])
c := exec.Command("/bin/bash", "-c", shellquote.Join(cmds[name]))
c.Stderr = &b
c.Stdout = &b

Expand Down Expand Up @@ -146,7 +147,7 @@ func Output(r cruntime.Manager, bs bootstrapper.Bootstrapper, runner command.Run
}
out.T(out.Empty, "==> {{.name}} <==", out.V{"name": name})
var b bytes.Buffer
c := exec.Command("/bin/bash", "-c", cmds[name])
c := exec.Command("/bin/bash", "-c", shellquote.Join(cmds[name]))
c.Stdout = &b
c.Stderr = &b
if rr, err := runner.RunCmd(c); err != nil {
Expand Down

0 comments on commit ed491fb

Please sign in to comment.