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

plugins: avoid crash on broken symlink #2545

Merged
merged 3 commits into from
Nov 5, 2023

Conversation

SnoopJ
Copy link
Contributor

@SnoopJ SnoopJ commented Nov 4, 2023

Description

This changeset adds a check that a plugin file actually exists on disk before it is added to the list of known plugins.

Closes #2269.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make lint and make test)
  • I have tested the functionality of the things this change touches

@SnoopJ SnoopJ added Bugfix Generally, PRs that reference (and fix) one or more issue(s) Core/Plugin Handling labels Nov 4, 2023
@SnoopJ SnoopJ force-pushed the bugfix/crash-on-broken-symlink branch 4 times, most recently from 9ddfa07 to ef1358c Compare November 4, 2023 20:45
@SnoopJ SnoopJ force-pushed the bugfix/crash-on-broken-symlink branch from ef1358c to 9e45e9a Compare November 4, 2023 20:51
sopel/plugins/__init__.py Outdated Show resolved Hide resolved
@dgw dgw changed the title plugins: crash on broken symlink plugins: avoid crash on broken symlink Nov 5, 2023
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked on my test bot:

dgw@ROGAlly:~/github/sopel-irc/sopel$ sopel-plugins list
Plugin path does not exist, skipping: '/home/dgw/github/dgw/sopel-duel/duel.py'
admin/python-module admin.py - Sopel Admin Plugin (sopel.builtins.admin) [disabled]
[...]

Perfection. 👌

@dgw dgw added this to the 8.0.0 milestone Nov 5, 2023
@dgw dgw merged commit 15a3b73 into sopel-irc:master Nov 5, 2023
@SnoopJ SnoopJ deleted the bugfix/crash-on-broken-symlink branch November 5, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Generally, PRs that reference (and fix) one or more issue(s) Core/Plugin Handling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken plugin symlink -> PluginError in CLI
2 participants