-
Notifications
You must be signed in to change notification settings - Fork 44
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
The '--dotfiles' option does not work as expected in conjunction with tree folding #120
Comments
Hi, thanks for the report. Please can you confirm which version you see this on? |
Of course, I also forgot to mention that I'm using WSL2. I'm not sure if/how this affects stow, so if there's a user error on my part, feel free to let me know! I have tested on Debian and Ubuntu and the behavior is identical even though '--verbose' output is different between the stow versions. On Debian in WSL2:$ stow -V $ perl -v $ hostnamectl On Ubuntu in WSL2:$ stow -V $ perl -v $ hostnamectl Verbose outputs--verbose=5 on Debian in WSL2:$ stow --dotfiles --simulate --verbose=5 stow-dir --verbose=5 on Ubuntu in WSL2:$ stow --dotfiles --simulate --verbose=5 stow-dir |
Much appreciated, especially with all the very helpful and well-structured detail. While anything prior to 2.4.0 can be flakey with respect to |
Thank you for your quick response and for looking into it! |
Hello,
The behaviour of the '--dotfiles' option seems unexpected when stow folds subtrees containing 'dot-' prefixed files. It appears that tree folding takes precedence over '--dotfiles', which is unintuitive as we are explicitly requesting translation to a dotfile.
Steps to reproduce:
$ tree -a ~
/home/user/
...
└── stow
└── stow-dir
└── pkg-dir
└── dot-file
$ cd ~/stow && stow --dotfiles stow-dir
Expected behaviour:
$ tree -a ~
/home/user/
...
├── pkg-dir
│ └── .file -> ../stow/stow-dir/pkg-dir/dot-file
└── stow
└── stow-dir
└── pkg-dir
└── dot-file
Actual behaviour:
$ tree -a ~
/home/user/
...
├── pkg-dir -> stow/stow-dir/pkg-dir
└── stow
└── stow-dir
└── pkg-dir
└── dot-file
Would it be possible to modify the implementation of '--dotfiles' or introduce an option to control this behaviour? While a workaround is to use '--no-folding', it is not ideal since you lose a lot of functionality. Another workaround is to manually create the 'pkg-dir' prior to stowing, which would then also result in the expected behaviour shown above.
Additionally, if this new behaviour is to be implemented, I'm assuming it would be impossible/out of scope to have 'pkg-dir' removed when unstowing with 'stow -D stow-dir'. This means that stow will leave empty directories after itself even when it "owns" everything, which I understand may not align with design guidelines. Should it be implemented however, a note in the '--dotfiles' documentation warning about this would likely also be needed.
The text was updated successfully, but these errors were encountered: