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

[Source] Make #search case sensistive even on case-insensitive HFS+ #231

Merged
merged 2 commits into from
Apr 27, 2015

Conversation

segiddins
Copy link
Member

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.

@@ -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]
Copy link
Contributor

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

Copy link
Member Author

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

@alloy
Copy link
Member

alloy commented Mar 30, 2015

Maybe the find module can be of help?

@segiddins
Copy link
Member Author

@alloy how so?

@alloy
Copy link
Member

alloy commented Mar 30, 2015

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.

@segiddins
Copy link
Member Author

This has been updated to no longer use a glob.

@kylef
Copy link
Contributor

kylef commented Apr 27, 2015

:shipit:

segiddins added a commit that referenced this pull request Apr 27, 2015
[Source] Make #search case sensistive even on case-insensitive HFS+
@segiddins segiddins merged commit cc360e3 into master Apr 27, 2015
@segiddins segiddins deleted the seg-search-case-sensitive branch April 27, 2015 16:31
Ashton-W pushed a commit to Ashton-W/Core that referenced this pull request Nov 2, 2015
…tive

[Source] Make #search case sensistive even on case-insensitive HFS+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error trying to push podspec NoMethodError - undefined method `native_target' for nil:NilClass
3 participants