dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Unintended behavior with Stow and nested directories

Open darrylabbate opened this issue 5 years ago • 0 comments

If stow is run on a folder under the following conditions:

  • The source folder contains another folder
  • The nested folder used by other utlities (gpg, stack, etc)
  • The folder did not exist in the destination before being stowed

The system will treat the whole nested folder as a regular ol' symlink. This is a problem because utilities such as Stack installs all sorts of garbage as part of its normal processes. Since the system is treating this directory like a regular symlink, all of these files will compel Git to track them.

The current workaround is to create an empty folder in the destination directory. Stow will then simply symlink the individual files instead of the entire folders. Currently this affects /gpg/.gnupg and haskell/.stack. This does not affect /vim/.vim/autoload because nothing else is ever written to the directory.

darrylabbate avatar Jun 23 '19 18:06 darrylabbate