-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix bug where dotfiles are found in package root #73 #229
Fix bug where dotfiles are found in package root #73 #229
Conversation
Hey, thanks for the PR! I'm working on some other stuff at the moment, but I'll try to get this merged by tomorrow or Monday. |
Not sure what's up, but these changes seem to be causing the false positives, I've never personally encountered them before, and it looks like the CI hasn't either. What environment are you using makedeb in? |
I'm using debian unstable |
I have the same issue, also on debian unstable. Anything we can do on our end to help you debug? |
I modified the original
This gives the following output:
|
Sorry for the late reply @JehhB and @knokelmaat, I didn't get anything in my GitHub notifications or I just overlooked it or something :P.
Not at the moment, I should be able to get a Debian unstable Docker container going shortly to get this all tested, I think a know a pretty good way to get this solved though. |
done | ||
return $ret | ||
local ret=0 | ||
for f in $(ls -Ad "$pkgdir"/.*); do |
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.
We should be able to just avoid ls
completely by using something like this. It does add another variable into the function, but it stops all this globbing nonsense that's causing issues:
local dotfiles
mapfile -t dotfiles < <(find -mindepth 1 -maxdepth 1 | sed 's|^\./||' | grep '^\.')
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.
What if I replace line 32 with
for f in $(find "$pkgdir" -mindepth 1 -maxdepth 1 -name '.*'); do
It also eliminate the globing issue and also doesn't introduce any new variable. I think it also better to keep the same error message wherein the full path of the dotfile is displayed.
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.
If there's a dotfile named something like .one two
, then that gets printed as two separate files with that approach. It's not the end of the world if that were to happen, but I'd prefer to stick with mapfile
just so errors all line up properly.
Hey I'm gonna go ahead and get this merged, all these MRs have been around for quite a bit and I'm just wanting them closed so they ain't lingering around forever |
Co-authored-by: Hunter Wittenborn <hunter@hunterwittenborn.com>
#73