diff --git a/pkg/minikube/audit/audit.go b/pkg/minikube/audit/audit.go index 83afccd671..8e2a498ac7 100644 --- a/pkg/minikube/audit/audit.go +++ b/pkg/minikube/audit/audit.go @@ -64,6 +64,10 @@ func Log(startTime time.Time) { func shouldLog() bool { // commands that should not be logged. no := []string{"status", "version"} + // in rare chance we get here without a command, don't log + if len(os.Args) < 2 { + return false + } a := os.Args[1] for _, c := range no { if a == c {