[CLI-2064] Only check for plugins in top-level directories in $PATH#1481
[CLI-2064] Only check for plugins in top-level directories in $PATH#1481Brian Strauch (brianstrauch) merged 2 commits intomainfrom
$PATH#1481Conversation
Alex Sweet (asweet-confluent)
left a comment
There was a problem hiding this comment.
It may be useful to include a negative test case for plugin search to make sure we don't regress on this in the future, i.e. add a new test plugin to at test/fixtures/input/plugin/no-peeking/confluent-really-no-peeking and make sure the CLI doesn't find it. If you've already done this and I missed it, please ignore my comment and take a gold star ⭐.
I haven't taken a deep dive into the code, but I'm wondering why running confluent without any args would scan the PATH directories in the first place? I would assume that the only time a full, file-by-file scan of PATH directories needs to happen is when the user runs confluent plugin list or when the user enters an unrecognized argument that needs to be resolved to a plugin.
Alex Sweet (@asweet-confluent) The idea was:
I suppose we could wait to alert them when they actually run the overlapping command... |
Makes sense 👍 |
Steven Gagniere (sgagniere)
left a comment
There was a problem hiding this comment.
This should speed things up!
Checklist
What
We should not be recursing all the way through the user's
$PATHdirectories. This is expensive and results in major slowdowns, especially on Windows systems.References
CLI-2064
Test & Review
Updated all tests