You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2940 introduced .chezmoi.config for use in templates, but trying to request the data results in a template execution error.
To reproduce
$ chezmoi execute-template '{{ .chezmoi.config.keepassxc.command }}'chezmoi: template: arg1:1:11: executing "arg1" at <.chezmoi.config.keepassxc.command>: can't evaluate field keepassxc in type interface {}
Doh! Good spot. I forgot to rename the fields. Using uppercase names (as they appear in the ConfigFile struct definition works (e.g. chezmoi execute-template '{{ .chezmoi.config.Keepassxc.Command }}') but the case is wrong. Thanks for testing and fix coming up.
Describe the bug
#2940 introduced
.chezmoi.config
for use in templates, but trying to request the data results in a template execution error.To reproduce
Expected behavior
Additional context
This can be worked around by piping through JSON:
It is probably sufficient to use a JSON-serialized copy of the read config rather than storing the read config itself.
The text was updated successfully, but these errors were encountered: