Closed drwicid closed 8 months ago
Thanks for reporting this. It is fixed with #3475.
Note that a better work-around is to use the quote
template function as this handles all characters that need to be escaped, not just backslashes.
[age]
identity = {{ joinPath .chezmoi.cacheDir "age.txt" | quote }}
You could also use | toToml
instead of | quote
.
You could also use
| toToml
instead of| quote
.
That's an even better solution, thank you.
Thanks for the alternatives. I'm two weeks into my chezmoi noob journey and loving this tool. I'll take this as an assignment to RTFM and master all those functions ;-)
Describe the bug
On Windows, the
.chezmoi.cacheDir
variable uses mixed path separators. This may causetoml: non-hex character
error if chezmoi reads the path string.To reproduce
Quick repro of the mixed case:
To reproduce the error, create this config template:
Execute
chezmoi init
Expected behavior
cacheDir
should have consistent path separators.Additional Info
Passing this config through execute-template:
outputs: