Closed flavio-a closed 11 months ago
Thanks for reporting this. Can you try with the following config:
dotfiles:
d_test:
src: tmp/test
dst: /tmp/test
cmpignore:
- '*/ignoreme'
upignore:
- '*/ignoreme'
Sorry for the late response.
I tried the config with '*/ignoreme'
and it produces the same (wrong) behaviour.
I was able to reproduce the bug with the cmpignore
, I'm working on a fix in https://github.com/deadc0de6/dotdrop/pull/408.
Analogously, if you add upignore and run dotdrop.sh import it copies ignoreme into dotfiles/test.
upignore
is meant for update
and not import
. Since you're removing ignoreme
in the dotpath, when import
is run, that directory still exists in /tmp/test/
and thus would be imported, that is the expected behavior.
I was able to reproduce the issue with import
and impignore
. It will be fixed in the same branch.
Tyvm. I really appreciate dotdrop and your work.
@flavio-a the fix is available in the master branch. Thanks again for your help on this :+1:
Dotdrop version and git commit (ran as submodule):
2eb1801eff77ad5e12658785b4cad5f2e4f16fc7 dotdrop (v1.13.2-51-g2eb1801)
Describe the bug
Dotdrop compares/imports (sub)directories matching
cmpignore
andupignore
in the config file. According to the documentation, adding a directory name incmpignore
/upignore
should not compare/import it.Steps to Reproduce
dotdrop.sh import <path to test>
config.yaml
add the linesignoreme
dir indotfiles/test
dotdrop.sh compare
Analogously, if you add
upignore
and rundotdrop.sh import
it copiesignoreme
intodotfiles/test
.Expected behavior
Dotdrop should not compare nor import the subdirectory
ignoreme
Additional information
The relevant part of the config file
These patterns exhibit the same bug:
'*ignoreme'
,ignoreme/
Single files and files matched by wildcards are ignored correctly: if I add eg.cmpignore: - ignoreme/*
it ignores the fileignoreme/config2
(you can see it with update). If this is the intended way to ignore a dir, I think it's worth mentioning explicitly in the documentation.Dotdrop's execution with the debug logs (
--verbose
)