`--dotfiles` does not work for non existing paths
I moved systems recently and I spotted weird behaviour by stow. I don't know if that is on purpuse, but if a directory does not exist, GNU stow symlinks to wrong paths instead of throwing an error.
this is my zsh package
zsh
├── dot-config
│ └── zsh
│ ├── dot-zprofile
│ ├── dot-zshenv
│ └── dot-zshrc
└── dot-zshenv
There is no ~/.config directory. After running:
stow -t $HOME -d $HOME/repos/dotf --dotfiles -v zsh
The output:
LINK: .config => repos/dotf/zsh/.config
UNLINK: .config (reverts previous action)
MKDIR: .config
LINK: .config/zsh => ../repos/dotf/zsh/dot-config/zsh
This creates the ~/.config with following structure:
.config
└── zsh -> ../repos/dotf/zsh/dot-config/zsh
Inside the ~/.config/zsh:
-rw-rw-r-- 1 user user 74 Nov 16 22:32 dot-zprofile
-rw-rw-r-- 1 user user 1561 Nov 23 08:35 dot-zshenv
-rw-r--r-- 1 user user 3201 Nov 25 17:01 dot-zshrc
The files names where not converted to . prefix and they where not symlinked.
Deleting ~/.config, running mkdir -p ~/.config/zsh and then re-running the same stow command fixes the issue.
Please can you confirm which version you're using?
stow 2.4.1
Damn, sounds like a genuine bug. I'm hoping to spend some time catching up with the Stow backlog over the Christmas break, will try to take a look then.