-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
More CaskLoader
improvements.
#16621
Changes from all commits
6e5b6b7
732e443
dc21095
889854b
a37afcb
76d8d6c
1323262
cb13f95
a8980a6
5cf4f2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,11 +256,11 @@ def to_paths(only: parent&.only_formula_or_cask, recurse_tap: false) | |
paths = [] | ||
|
||
if formula_path.exist? || | ||
(!CoreTap.instance.installed? && Homebrew::API::Formula.all_formulae.key?(path.basename)) | ||
(!CoreTap.instance.installed? && Homebrew::API::Formula.all_formulae.key?(path.basename.to_s)) | ||
paths << formula_path | ||
end | ||
if cask_path.exist? || | ||
(!CoreCaskTap.instance.installed? && Homebrew::API::Cask.all_casks.key?(path.basename)) | ||
(!CoreCaskTap.instance.installed? && Homebrew::API::Cask.all_casks.key?(path.basename.to_s)) | ||
Comment on lines
-259
to
+263
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this somehow got coerced to strings before. Otherwise, I'm not really sure how this ever worked. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's because we have a |
||
paths << cask_path | ||
end | ||
|
||
|
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 think this might even be a touch faster here. The
Homebrew::API.tap_from_source_download
method is quite slow when it gets called a lot in commands likebrew readall
. This change in logic means it will get called less in that scenario though I plan on opening a PR soon to move fromPathname#relative_path_from
in that method to a regex to speed things up anyway.