Improve error message

This commit is contained in:
andig 2021-09-17 11:33:57 +02:00
parent e964f2760c
commit 7613c57ca9

View file

@ -43,7 +43,10 @@ func runToken(cmd *cobra.Command, args []string) {
}
if vehicleConf.Name == "" {
log.FATAL.Fatal("vehicle not found")
vehicles := funk.Map(conf.Vehicles, func(v qualifiedConfig) string {
return v.Name
}).([]string)
log.FATAL.Fatalf("vehicle not found, have %v", vehicles)
}
var token *oauth2.Token