status: properly state if cluster does not exist

pull/7041/head
Thomas Stromberg 2020-03-13 15:58:14 -07:00
parent 5986083ca0
commit 9fa98a834b
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ var statusCmd = &cobra.Command{
cc, err := config.Load(viper.GetString(config.ProfileName))
if err != nil {
if config.IsNotExist(err) {
exit.WithCodeT(exitCode(&Status{}), `The "{{.name}}" cluster does not exist!`, out.V{"name": config.ProfileName})
}
exit.WithError("getting config", err)
}