Closed srouquette closed 3 months ago
as a work around, forcing the interpreter (like for .ps1) seems to work.
{{ if ne $os "windows" -}}
[interpreters.sh]
command = "bash"
[interpreters.ps1]
command = "bash"
{{- end }}
as a work around, forcing the interpreter (like for .ps1) seems to work.
Setting interpreters.sh
is the correct solution, not a workaround.
What exactly are you trying to do?
my repo, I will change it's name later.
I'm trying to have a single dotfiles repo, which will work on Windows, msys2 and linux (wsl).
I installed chezmoi via scoop (windows) and it's also available on msys2. My setup on Windows works. Now, when I try to run chezmoi on msys2 with bash scripts, it produces an error like it's trying to run them as Windows scripts I also symlinked
~/.local/share/chezmoi
to/c/Users/syl/.local/share/chezmoi
to have a single repo.Here is the output on msys2:
What have you tried so far?
Describe what you have tried so far.
Where else have you checked for solutions?
Output of any commands you've tried with
--verbose
flagOutput of
chezmoi doctor
Additional context
I also noticed that when I made a mistake in a command in go template, for example
{{- $vscode_ext := output "code --list-extensions" -}}
, it seemed to look in %PATH% instead of $PATH.Also, the code above is a bit of a trick, the extension is .ps1, but I have this in .chezmoi.toml