Closed ErrrorMaxx closed 8 months ago
Thanks for spotting this!
For background info, chezmoi needs to distinguish between diff.pager
being set to the empty string in the user's config file (which means disable the diff pager) and diff.pager
not being set (which means use the default diff pager). For this, chezmoi sets diff.pager
to a sentinel value ("\u0000") by default, so it can tell if the user set diff.pager
or not in their config file. This sentinel value was leaking into the output of chezmoi data
.
Describe the bug
chezmoi data
(and probably{{ .chezmoi.config.diff.pager }}
template) returns strange.chezmoi.config.diff.pager
when it is not set in config fileTo reproduce
cz data | gojq '.chezmoi.config.diff.pager'
orcz data | jq '.chezmoi.config.diff.pager'
orcz data | grep pager
Whendiff.pager
is not set in config fileExpected behavior
When pager is not set in config file
chezmoi data
should return""
, not"\u0000"
for.chezmoi.config.diff.pager
Output of command with the
--verbose
flagOutput of
chezmoi doctor