Closed dpprdan closed 8 months ago
I stumble over this while trying to include a public ssh key (something like ~/.ssh/id_rsa.pub
) in a template.
If there is a better way than {{ joinPath .chezmoi.destDir ".ssh/id_rsa.pub" | include | trim | quote }}
, I am all ears (e.g. a way to expand a ~
path).
This definitely seems like a bug.
Assuming you haven't overridden the destination directory, you can probably use .chezmoi.homeDir
while we investigate.
Thanks for quick response! .chezmoi.homeDir
is what I actually want.
This isn't a bug after all. Turns out I have been looking at the wrong document, i.e. configuration-file/variables instead of templates/variables. 🤦🏻♂️ Sorry for the confusion!!
Maybe there could/should be a chezmoi.destDir
? But that is separate issue, so I am closing this.
Thanks again!
Describe the bug
According to the documentation,
.chezmoi.destDir
has the default value%USERPROFILE%
in Windows. However, when I runchezmoi execute-template "{{ .chezmoi.destDir }}"
I get an key has apparently not been set.To reproduce
Steps to reproduce the behavior.
Expected behavior
Output of command with the
--verbose
flagOutput of
chezmoi doctor