From 97f798b5c5fa22c46a2f88d72035420ff91e242c Mon Sep 17 00:00:00 2001 From: James Mills <1290234+prologic@users.noreply.github.com> Date: Thu, 30 Mar 2023 21:15:08 +1000 Subject: [PATCH] Fix debugability of non-existent plugins or variables in non-production mode --- .vscode/settings.json | 1 + main.go | 4 ++++ 2 files changed, 5 insertions(+) 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])) + } } }