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

Need Help: Can´t make the stow ignore list work #119

Open
0inp opened this issue Sep 30, 2024 · 3 comments
Open

Need Help: Can´t make the stow ignore list work #119

0inp opened this issue Sep 30, 2024 · 3 comments

Comments

@0inp
Copy link

0inp commented Sep 30, 2024

Hi !

I can´t make the `.stow-local-ignore´ work.
I have a ´.dotfiles´ directory in my home directory. Let´s say that in that dotfiles directory I have a ´resources´ directory with some shell script. I just want to not stow that resources directory.
I tried a bunch of different regex for that directory or for the files in that directory, I just can´t make it work.
From my dotfiles directory, I am just using the ´stow */´ command.

So, what line should I add in my stow-local-ignore file ?

thanks for your help

Other question, is it possible to make the ignore lists respective to platforms/envs?
let´s say I have all my dotfiles for macos and ubuntu, I just want to ignore for example the ubuntu directories/files when I am on MacOS or vice-versa.

Again, thanks for your help

@aspiers
Copy link
Owner

aspiers commented Sep 30, 2024

You can just add resources to .stow-local-ignore. No need for any regex.

Other question, is it possible to make the ignore lists respective to platforms/envs?
let´s say I have all my dotfiles for macos and ubuntu, I just want to ignore for example the ubuntu directories/files when I am on MacOS or vice-versa.

No, there's no way to do this natively. You would have to automate the generation of .stow-local-ignore based on which OS you're on. A simple script or Makefile could do this easily.

@0inp
Copy link
Author

0inp commented Oct 1, 2024

No, there's no way to do this natively. You would have to automate the generation of .stow-local-ignore based on which OS you're on. A simple script or Makefile could do this easily.

Thanks a lot, I´ll do that, it seems a good solution.

On the other hand, I really can´t make the ignore list work, sorry !
I think this have something to do with the structure of my dotfiles.
lets say that I have my ~/.dotfiles directory directly in my home directory.
Inside my .dotfiles directory, I have a resources directory with a macos_settings.sh shell script file (ie ~/.dotfiles/resources/macos_settings.sh).
I have a .stow-local-ignore file with a line with just the word "resources".
Let´s say that I have a clean home folder without the macos_settings.sh file (I removed it from previous stow operation)
Nevertheless, when I do the command stow */ to stow all my dotfiles, I still have the ~/macos_settings.sh file appearing in my home directory.

@aspiers
Copy link
Owner

aspiers commented Oct 2, 2024

Where have you placed the .stow-local-ignore file? Also try running stow with -v5 or similar and checking the debug output for lines containing Using ignore file:.

Otherwise I can only help if you provide an exact sequence of commands to minimally reproduce the issue. I strongly recommend reading How to Report Bugs Effectively as it will help you to help software maintainers to help you :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants