-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
use globbing instead of find #409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this pull request! Be sure to follow the pull request template!
It is when you consider how many images we publish use the same code. You should look into why in your environment find doesn't find them as we can't reproduce it. |
I am a bot, here are the test results for this PR:
|
You're absolutely right.
I absolutely should, and I will. However, I still think the change is valid. The current implementation with This can be checked by creating a character special device named i.e. Of course, it isn't very normal with spaces and newlines in device filenames, and it isn't really a security problem, but I don't think that's a good reason not to handle it. Especially when doing so is easier, cleaner, and involves one less fork :) |
The link you provided has nothing to do with your current issue. That link is about potential pitfalls when transferring results from one program to another. Your issue is Our solution has been tested for a long time on various different os baseimages. The only environment we are aware of where our solution does not work is when running docker in lxc (common with proxmox users) but we don't support or recommend that environment. In fact, even the proxmox devs recommend against running docker in lxc as it can cause a lot of other issues. Replacing our well tested solution with an untested solution to solve one user's (your) issue has too high of a risk to benefit ratio. |
I didn't mean to imply the link had anything to do with |
Description:
Use bash globbing instead of find.
find
doesn't seem to recognize any of the files in my/dev/dri
-folder as character special files. Bash's[[ -c file ]]
does.Also, using globbing should be a little bit safer. It's hard to loop over files from another program. So hard it's one of the top bash pitfalls. Using globbing is simpler and cleaner.
Benefits of this PR and context:
A little bit cleaner code, that also works on my system.
How Has This Been Tested?
I ran the script.
It's not a big change :)
podman version 5.2.3, on Debian Testing. Image id 88b59fbfee1f
Source / References: