Skip to content
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

.stow-local-ignore: stow does not ignore file when parent directory does not exist #91

Open
Kraymer opened this issue Aug 1, 2021 · 0 comments

Comments

@Kraymer
Copy link

Kraymer commented Aug 1, 2021

The package exhibiting the problem : https://github.com/Kraymer/F-dotfiles/tree/master/git
the file /.config/git/credentials.example should be ignored because declared in .stow-local-ignore, it is not always the case

stowing if ~/.config/git̀ exists beforehand => .stow-local-ignore works as expected

$ mkdir ~/.config/git
$ stow -v5 -D git   
[...]
Stowing contents of dev/F-dotfiles/git/.config/git (cwd=/home/flap)
  => ../../dev/F-dotfiles/git/.config/git
  is_a_node(.config/git)
  link_task_action(.config/git): no task
  dir_task_action(.config/git): no task
    parent_link_scheduled_for_removal(.config/git): prefix .config
    parent_link_scheduled_for_removal(.config/git): prefix .config/git
    parent_link_scheduled_for_removal(.config/git): returning false
  is_a_node(.config/git): really exists
  Using ignore file: dev/F-dotfiles/git/.stow-local-ignore
    Using memoized regexps from dev/F-dotfiles/git/.stow-local-ignore
    Ignore list regexp for paths:    /(?^:(^|/)(.config/git/credentials.example|\.config/git/credentials.example|/.config/git/credentials.example|^/\.stow\-local\-ignore$)(/|$))/
    Ignore list regexp for segments: /(?^:^(\.example)$)/
  Ignoring path /.config/git/credentials.example

stowing if ~/.config/git̀ not exists beforehand => ~/.config/git̀ is symlinked including ignored file

$ rm -rf ~/.config/git
$ stow -v5 -D git   
[...]
Stowing contents of dev/F-dotfiles/git (cwd=/home/flap)
  => dev/F-dotfiles/git
  is_a_node(.)
  link_task_action(.): no task
  dir_task_action(.): no task
    parent_link_scheduled_for_removal(.): prefix 
    parent_link_scheduled_for_removal(.): returning false
  is_a_node(.): really exists
  Using ignore file: dev/F-dotfiles/git/.stow-local-ignore
    Using memoized regexps from dev/F-dotfiles/git/.stow-local-ignore
    Ignore list regexp for paths:    /(?^:(^|/)(^/\.stow\-local\-ignore$|.config/git/credentials.example)(/|$))/
    Ignore list regexp for segments: none
  Not ignoring .config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant