@@ -61,14 +61,14 @@ var profileListCmd = &cobra.Command{
61
61
func printProfilesTable () {
62
62
validProfiles , invalidProfiles , err := config .ListProfiles ()
63
63
64
- if len (validProfiles ) == 0 {
65
- exit .UsageT ("No minikube profile was found. You can create one using `minikube start`." )
66
- }
67
-
68
64
if err != nil {
69
65
glog .Warningf ("error loading profiles: %v" , err )
70
66
}
71
67
68
+ if len (validProfiles ) == 0 {
69
+ exit .UsageT ("No minikube profile was found. You can create one using `minikube start`." )
70
+ }
71
+
72
72
updateProfilesStatus (validProfiles )
73
73
renderProfilesTable (profilesToTableData (validProfiles ))
74
74
warnInvalidProfiles (invalidProfiles )
@@ -94,23 +94,26 @@ func profileStatus(p *config.Profile, api libmachine.API) string {
94
94
95
95
host , err := machine .LoadHost (api , driver .MachineName (* p .Config , cp ))
96
96
if err != nil {
97
- return ""
97
+ glog .Warningf ("error loading profiles: %v" , err )
98
+ return "Unknown"
98
99
}
99
100
100
101
cr , err := machine .CommandRunner (host )
101
102
if err != nil {
102
- return ""
103
+ glog .Warningf ("error loading profiles: %v" , err )
104
+ return "Unknown"
103
105
}
104
106
105
107
hostname , _ , port , err := driver .ControlPlaneEndpoint (p .Config , & cp , host .DriverName )
106
108
if err != nil {
107
- return ""
109
+ glog .Warningf ("error loading profiles: %v" , err )
110
+ return "Unknown"
108
111
}
109
112
110
113
status , err := kverify .APIServerStatus (cr , hostname , port )
111
114
if err != nil {
112
115
glog .Warningf ("error getting apiserver status for %s: %v" , p .Name , err )
113
- return ""
116
+ return "Unknown "
114
117
}
115
118
return status .String ()
116
119
}
0 commit comments