Replies: 3 comments
-
The possible workaround is to delete |
Beta Was this translation helpful? Give feedback.
-
Maybe add Not sure as I've never tested it, but it seems that would keep you from chezmoi wanting to deal with that path. |
Beta Was this translation helpful? Give feedback.
-
Thanks for reporting this! Fundamentally, I think you've hit #1574 which will require a refactor of chezmoi's internals to fix. This is planned (but not promised) for chezmoi v3.
You created a fantastic bug report in #2964 and this should now be fixed with #2966 and released in |
Beta Was this translation helpful? Give feedback.
-
I have a
~/.zsh/
directory. It holds all my rc scripts for zsh, as well a git repo holding the ZGen package manager. I am trying to migrate this setup to chezmoi.So, I create
.chezmoiexternal.toml
:and use it for a bit and everything is fine.
But then I edit my zsh configuration, and I don't want to manually add every file in
.zsh
that I edited, so I justchezmoi add ~/.zsh
. And that succeeds, or at least appears to! But then Ichezmoi status
and:Looking at my source dir reveals that
chezmoi add
has created adot_zsh/zgen
directory. Apparentlychezmoi add
was not able to realize that.zsh/zgen
was managed by.chezmoiexternal
and tried to add it normally, thus the inconsistency.I can work around this by adding it to
.chezmoiignore
:but that produces a big ball of warning spam.
I've also tried using git submodules with the
external_
prefix as documented here, which work a lot better overall, but have a different problem: even with theexternal_
prefix, the executable bit isn't preserved for any files in that submodule.Ideally, I think, the behaviour I would like is:
cm add
copies those edits into the cm repo, andcm apply
discards them.chezmoiexternal
seems to be the preferred approach for this, but I can't figure out how to get that behaviour. Submodules are a lot closer, apart from the executable bit getting dropped.Anyone know how to do this?
Beta Was this translation helpful? Give feedback.
All reactions