Skip to content

Commit

Permalink
Merge pull request #6325 from afbjorklund/dashboard-crash
Browse files Browse the repository at this point in the history
Stop minikube dashboard from crashing at start
  • Loading branch information
medyagh authored Jan 21, 2020
2 parents 20e6c5c + b7f3ff7 commit e0a8b7d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/minikube/cmd/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,17 @@ var dashboardCmd = &cobra.Command{
Short: "Access the kubernetes dashboard running within the minikube cluster",
Long: `Access the kubernetes dashboard running within the minikube cluster`,
Run: func(cmd *cobra.Command, args []string) {
cc, err := pkg_config.Load(viper.GetString(config.MachineProfile))
profileName := viper.GetString(pkg_config.MachineProfile)
cc, err := pkg_config.Load(profileName)
if err != nil && !os.IsNotExist(err) {
exit.WithError("Error loading profile config", err)
}

if err != nil {
out.ErrT(out.Meh, `"{{.name}}" profile does not exist`, out.V{"name": profileName})
os.Exit(1)
}

api, err := machine.NewAPIClient()
defer func() {
err := api.Close()
Expand Down

0 comments on commit e0a8b7d

Please sign in to comment.