-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Bug report] Cannot register command for plugins that are symlinked #459
Comments
I never truly gave attention to support for symlinked plugins, and given the current state of Powercord (maintenance, with bigger problems to worry about with Discord's roll out of forced context isolation), I don't know if this will ever be worked on, and the fix most likely will be v3 (since v3 core is very different from v2 core) |
Oof, that's a pain. I like keeping my dev environments all in the same place, so I can quickly find projects in intellij. (I keep all programming projects in Alternatively, you could just add some simple way to add a dir that contains a plugin (Meaning, if the dir is |
I'd like to add that it also breaks themes |
Describe the bug
when registering a command from a folder that is not in the plugin directory (meaning, you created a symlink to an external directory), then powercord fails with this error:
To Reproduce
Create a symlink in your plugin dir to another dir
Make a simple plugin that registers a command.
The error will occur when the command is attempting to be registered.
(Hell, the object passed to the
registerCommand
method can even be null, that will still cause the error.)Expected behavior
Powercord doesn't rely on directory hard path for command registration.
Perhaps instead it could work like this:
All the methods to register settings/commands use methods from the plugin class, and then the plugin class has a name that it registers.
That way, it uses the name property instead of the hacky error trace code that can break.
Or just use the stack trace, but then instead of matching with the plugin dir, it just replaces the plugin dir with an empty string, replaces
.
with/
, and then trims the first/
.Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Here is a link to the exact line on which it occurs.
The text was updated successfully, but these errors were encountered: