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

runme attempts to access unreadable files or directories #645

Closed
pastuxso opened this issue Aug 5, 2024 · 2 comments · Fixed by #646
Closed

runme attempts to access unreadable files or directories #645

pastuxso opened this issue Aug 5, 2024 · 2 comments · Fixed by #646
Assignees
Labels
bug Something isn't working

Comments

@pastuxso
Copy link
Collaborator

pastuxso commented Aug 5, 2024

I encountered an issue where the runme does not skip unreadable files or directories during processing, leading to a permission denied error. This behavior occurs even when the files or directories should be ignored using the --ignore-pattern flag.

Issue reported on Discord

PR to replicate the issue: #646 https://github.com/stateful/runme/actions/runs/10252402970/job/28362697530?pr=646#step:7:33

@adambabik
Copy link
Collaborator

It looks like we don't handle os.ErrPermission

err := util.Walk(p.fs, ".", func(path string, info fs.FileInfo, err error) error {
if err != nil {
return err
}
.

This type of error should be handled separately, and if the path is ignored, it should be skipped. @pastuxso would you like to tackle this?

@pastuxso
Copy link
Collaborator Author

pastuxso commented Aug 7, 2024

@adambabik, I could fix it. Thank you for your review. 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants