Fix debugability of non-existent plugins or variables in non-production mode

This commit is contained in:
James Mills 2023-03-30 21:15:08 +10:00
parent 3823e20a03
commit 97f798b5c5
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
2 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,7 @@
"stefanfritsch",
"Strikethrough",
"tasklist",
"Texter",
"wikilink",
"yuin",
"ZSCONFIG",

View File

@ -455,6 +455,10 @@ func render(s string, vars Vars) (string, error) {
} else {
log.WithError(err).Warnf("error running command: %s", m[0])
}
} else {
if !viper.GetBool("production") {
out.WriteString(fmt.Sprintf("%s: plugin or variable not found", m[0]))
}
}
}