-
Notifications
You must be signed in to change notification settings - Fork 349
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
[Source] Make #search case sensistive even on case-insensitive HFS+ #231
Conversation
@@ -201,7 +201,8 @@ def search(query) | |||
if query.is_a?(Dependency) | |||
query = query.root_name | |||
end | |||
if (specs_dir + query).directory? | |||
spec_dir = specs_dir + query | |||
if Pathname.glob(spec_dir) == [spec_dir] |
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 escape this path given to glob, since it could contain characters causing it to break. See CocoaPods/CocoaPods@f4df7a6
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.
I don't think we need to, as there are no valid spec names that contain glob characters
Maybe the find module can be of help? |
@alloy how so? |
Maybe it ends up being a faster way to implement the search/Pathname.glob (of which we have our own implementation iirc?), which is what you were mentioning. |
…he need to escape glob patterns
This has been updated to no longer use a glob. |
[Source] Make #search case sensistive even on case-insensitive HFS+
…tive [Source] Make #search case sensistive even on case-insensitive HFS+
I'd love to do this in a faster way, and in a manner that doesn't rely on
Pathname.glob
's results matching the underlying preserved case.\c @kylef @samdmarshall
Closes CocoaPods/CocoaPods#3024.
Closes CocoaPods/CocoaPods#2910.