aspiers / stow

GNU Stow - mirror of savannah git repository occasionally with more bleeding-edge branches
http://www.gnu.org/s/stow/
GNU General Public License v3.0
589 stars 41 forks source link

nvim stow from .config #112

Closed AnirudhG07 closed 2 weeks ago

AnirudhG07 commented 2 weeks ago

Hi, I have been using stow version 2.4.0 on MacOS M1. I am facing issue stowing my nvim.

Problem

I have stored my nvim/.config/nvim/.... in ~/.config directory. When I run command stow nvim, it is giving error-

WARNING: skipping target which was current stow directory .config

Observation

  1. Although when I make ~/dotfile/ directory and store nvim there. Then if I run stow nvim, it works perfectly fine.
  2. If I stow my zsh/.zshrc, it works perfectly from ~/.config.

Please explain this and Is it possible to stow nvim from ~/.config

aspiers commented 2 weeks ago

Please can you rerun stow -vvv nvim and paste the output, as there are a few pieces of information missing from your report. Thanks!

AnirudhG07 commented 2 weeks ago

Yes

stow dir is /home/admin/.config
stow dir path relative to target /home/admin is .config
cwd now /home/admin
cwd restored to /home/admin/.config
cwd now /home/admin
Planning stow of package nvim...
Stowing contents of .config/nvim (cwd=/home/admin)
Stowing .config / nvim / .config
WARNING: skipping target which was current stow directory .config
Planning stow of package nvim... done
cwd restored to /home/admin/.config
Processing tasks...

That's it. It still didnt work though.

AnirudhG07 commented 2 weeks ago

By the way, I kinda changed my machine(for this issue) from Mac to linux(VM), cause I made dotfiles folder anyway so this is now Linux response. Also, the initial warning I sent remains the same for stow nvim.

aspiers commented 2 weeks ago

Ah, I see the problem now. You're using ~/.config as the stow directory, but your target is ~ and so your nvim package also has contents which you're asking to stow into ~/.config. That can't work because for safety reasons Stow doesn't allow stowing directly into the stow directory. The solution is to put your stow directory somewhere else, e.g. ~/.STOW or ~/.config/STOW.

AnirudhG07 commented 2 weeks ago

Alright cool. Thanks

aspiers commented 2 weeks ago

Closing as resolved