From: James Mills <1290234+prologic@users.noreply.github.com> Date: Thu, 30 Mar 2023 11:15:08 +0000 (+1000) Subject: Fix debugability of non-existent plugins or variables in non-production mode X-Git-Tag: 0.4.0~7 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=97f798b5c5fa22c46a2f88d72035420ff91e242c;p=aya.git Fix debugability of non-existent plugins or variables in non-production mode --- diff --git a/.vscode/settings.json b/.vscode/settings.json index bf10f16..48bb71c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,6 +19,7 @@ "stefanfritsch", "Strikethrough", "tasklist", + "Texter", "wikilink", "yuin", "ZSCONFIG", diff --git a/main.go b/main.go index 8f77ca1..a73aa28 100644 --- a/main.go +++ b/main.go @@ -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])) + } } }