Skip to content

--dotfiles does not work for non existing paths #134

@lfk-dev

Description

@lfk-dev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions