-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chezmoi confused with exact_
and externals inside it
#3414
Comments
I suspect that this has the same root cause as #2132. As a workaround, you should be able to run: $ mkdir $(chezmoi source-path ~/.bashrc.d)/exact_additional
$ touch $(chezmoi source-path ~/.bashrc.d)/exact_additional/.keep but note that I haven't tried this. |
I tried to replicate this in #3428, but was unsuccessful. Do you have a small example that demonstrates the problem? |
The files must already be "installed" into the target state. Then, once they're installed, running In your test you only execute The first run prints only the message that content has changed, which is not true |
Thanks for spotting the problems with the test. #3428 should now fix the problem. Would you be able to test this? As a bit of background:
#3428 fixes this by adding the internal concept of implicit directories, which are directories that are implicit in the path to an external, but are not actual directories in the source state. |
I can confirm that your fix fixes the issue. Tested and described problems went away. Thank you! |
Describe the bug
exact_
directory, even when the external files have not changed.o
(tooverwrite
)the prompt changes to the following error message and the directory containing the externals has been deleted:
Thus losing the content of
~/.bashrc.d/additional
, which is unexpectedTo reproduce
Have the folder
exact_private_dot_bashrc.d
with some files in itand this
.chezmoiexternals/fzf.toml.tmpl
:Note:
.bashrc.d/additional
is not defined in theexact_
directory, because it shall be only created for externals.Expected behavior
Chezmoi shouldn't ask to overwrite the external files (as they weren't changed) and instead consider them to be part of the
exact_
directory.And even if the content has changed, being part of an
exact_
directory, I would expect it to overwrite the files straight away.Output of command with the
--verbose
flagOutput of
chezmoi doctor
The text was updated successfully, but these errors were encountered: