mirror of
https://git.mills.io/prologic/zs
synced 2025-04-02 21:06:14 +03:00
Fix debugability of non-existent plugins or variables in non-production mode
This commit is contained in:
parent
3823e20a03
commit
97f798b5c5
2 changed files with 5 additions and 0 deletions
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
@ -19,6 +19,7 @@
|
|||
"stefanfritsch",
|
||||
"Strikethrough",
|
||||
"tasklist",
|
||||
"Texter",
|
||||
"wikilink",
|
||||
"yuin",
|
||||
"ZSCONFIG",
|
||||
|
|
4
main.go
4
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]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue