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

babashka.fs/glob crashes when encountering permission errors #89

Closed
teodorlu opened this issue Feb 7, 2023 · 1 comment
Closed

babashka.fs/glob crashes when encountering permission errors #89

teodorlu opened this issue Feb 7, 2023 · 1 comment

Comments

@teodorlu
Copy link
Contributor

teodorlu commented Feb 7, 2023

On my Mac, I get the following behavior:

user=> (babashka.fs/glob "/private" "**/deps.edn")
java.lang.Exception: Visiting /private/etc/cups/certs failed [at <repl>:6:1]

I use babashka.fs/glob to find all deps.edn files in a subfolder in neil-quickadd. In my case, I'd prefer ignoring files and folders with permission errors.

https://github.com/teodorlu/neil-quickadd/blob/7bb1629670966d4e40adf458bc157f08eb2dc8f1/src/teodorlu/neil_quickadd.clj#L31

The glob folder traversal logic appears to be in babashka.fs/match:

https://github.com/babashka/fs/blob/master/src/babashka/fs.cljc#L250-L314

@borkdude
Copy link
Contributor

borkdude commented Feb 8, 2023

Fixed in v0.2.16. You can load that version in babashka as follows: (require '[babashka.fs] :reload) until the following release of babashka.

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

2 participants