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

cli-plugins: Fix searching inaccessible directories #5651

Merged
merged 2 commits into from
Nov 29, 2024

Commits on Nov 28, 2024

  1. 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]>
    vvoland committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    6de3d71 View commit details
    Browse the repository at this point in the history
  2. cli-plugins: Simplify addPluginCandidatesFromDir

    The returned error is always nil now, so just remove it.
    
    Signed-off-by: Paweł Gronowski <[email protected]>
    vvoland committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    fcd94fe View commit details
    Browse the repository at this point in the history