-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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 "no matches for wildcard" error in env-setup.fish script. #58345
Conversation
hacking/env-setup.fish
Outdated
if test -e $PREFIX_PYTHONPATH/ansible*.egg-info | ||
# Cannot use `test` on wildcards. | ||
# @see https://github.com/fish-shell/fish-shell/issues/5960 | ||
if count $PREFIX_PYTHONPATH/ansible*.egg-info > /dev/null | ||
rm -rf "$PREFIX_PYTHONPATH/ansible*.egg-info" |
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.
Ummm... this bit won't work, because the "*" is quoted?
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.
Hrm, I tested it locally and it worked nicely. Are you saying I should quote it?
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.
Noooo.
The rm -rf
argument should not be quoted, is what I'm saying.
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.
rm -rf "$PREFIX_PYTHONPATH/ansible*.egg-info"
does not work because of the quotes.
When you say "it worked nicely", what you mean is presumably that you're not seeing the error anymore. But that's probably just because no file matches, so the rm
is never executed.
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.
Oh, I see now. I was still looking at the if
line, doh. I'll fix and test locally.
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.
Nice catch! Fixed, tested, pushed!
@ElijahLynn @faho Thank you for this fix. I could not figured out a way to get rid of this error when I wrote that line. Much appreciated, and I learned something. 😄 |
SUMMARY
Fix "no matches for wildcard" error in env-setup.fish script. See fish-shell/fish-shell#5960
ISSUE TYPE
COMPONENT NAME
hacking/env-setup.fish
ADDITIONAL INFORMATION
Before
After