Closed elldritch closed 2 years ago
The syntax of .chezmoiignore
is different to .gitignore
. You need to explicitly ignore subdirectories. The following should work:
$ cat ~/.local/share/chezmoi/dot_xmonad/.chezmoiignore
xmonad.errors
dist-newstyle
dist-newstyle/**
Thank you, that works for me!
Describe the bug
If I
.chezmoiignore
a directory in my source state, runningchezmoi add .
in my target folder will then cause aparent directory not in source state
error. To work around this, I have to manuallychezmoi add DIR
every directory except the ignored directory.To reproduce
My source directory looks something like this:
I use this
.chezmoiignore
to ignore~/.xmonad/dist-newstyle
, which is a folder containing large built binary artifacts that I don't want to share between machines:Unfortunately, with this
.chezmoiignore
, runningchezmoi add .
in~/.xmonad
returns an error:My guess as to what's happening here is that the ignored folder is not being copied to the source state but is still being traversed, and an error is thrown when chezmoi tries to copy a child of the ignored directory into the source state.
Expected behavior
I would expect
chezmoi
to know to ignore all subdirectories of a.chezmoiignore
d directory without returning an error.Output of command with the
--verbose
flagOutput of
chezmoi doctor