-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli-plugins: Fix searching inaccessible directories
Fix a case where one inaccessible plugin search path stops the whole search and prevents latter paths from being scanned. Remove a preliminary `Stat` call that verifies whether path is an actual directory and is accessible. It's unneeded and doesn't actually check whether the directory can be listed or not. `os.ReadDir` will fail in such case anyway, so just attempt to do that and ignore any encountered error, instead of erroring out the whole plugin candidate listing. Signed-off-by: Paweł Gronowski <[email protected]>
- Loading branch information
Showing
2 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters