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

Add Option to Ignore "Globbing couldn't find anything matching" #284

Closed
patbakdev opened this issue Jul 23, 2021 · 2 comments
Closed

Add Option to Ignore "Globbing couldn't find anything matching" #284

patbakdev opened this issue Jul 23, 2021 · 2 comments

Comments

@patbakdev
Copy link

I have the following config with the intention of being able to just drop in files/folders and have them automatically picked up. But if some folders are empty, then I get the warning ("Globbing couldn't find anything matching ...") and exit code 1. I'd like to have an option to ignore this warning and return exit code 0.

- defaults:
    link:
      create: true
      relink: true
      glob: true

- clean:
    - ~/
    - ~/.config
    - ~/.local
    - ~/.local/bin

- link:
    ~/:
      path: ./.*
      exclude:
        - ./.config
        - ./.local
    ~/.config/:
      path: ./.config/*
    ~/.local/:
      path: ./.local/*
      exclude:
        - ./.local/bin
    ~/.local/bin:
      path: ./.local/bin/*

Perhaps something like:

- link:
    ~/:
      path: ./.*
      ignore_empty_glob: true     <-- NEW
      exclude:
        - ./.config
        - ./.local
@brutus
Copy link

brutus commented Apr 2, 2023

Same here. I'll add a quick PR (not thought through, missing test, etc. but works for me - so far YMMV).

brutus added a commit to brutus/dotbot that referenced this issue Apr 2, 2023
tokebe added a commit to tokebe/dotbot that referenced this issue May 1, 2023
anishathalye added a commit that referenced this issue Jul 9, 2023
This is convenient and more flexible. See
#284.
@anishathalye
Copy link
Owner

This is now unconditionally allowed (no ignore_empty_glob: true required), as of 4daa065.

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

3 participants