-
Notifications
You must be signed in to change notification settings - Fork 913
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
lightning-cli plugin start - Assume default relative path #5211
lightning-cli plugin start - Assume default relative path #5211
Conversation
absolute context, assume it is a relative path to the default plugins dir. As a result, the following now works when my_plugin.py is installed in the default plugins dir: lightning-cli plugin start my_plugin.py Changelog-Added: plugin start RPC subcommand now assumes relative path to default plugins dir if the path is not found in absolute context. i.e. lightning-cli plugin start my_plugin.py modified: plugin_control.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK 41409be
Why not, I think this is a good shortcut to load the plugin at runtime, I need to test it locally!
Notice that there may be more than one |
Yes, I like the idea of searching all plugin dirs. But it's tricky; I don't think we remember them. Perhaps we should just search each dir we found a previous plugin? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea! Minor cleanup, and some documentation would be great!
Thanks!
In relative path context, use the default plugin path available at cmd->ld->plugins->default_dir instead of piecing it together using the lightning basedir and "plugins/". Also update the plugin documentation to reflect that the use of a relative path is now available. Changelog-Added: plugin start RPC subcommand now derives the default plugin dir available via cmd->ld->plugins->default_dir to search for plugins in relative path context. Plugin documentation also updated. modified: doc/lightning-plugin.7.md modified: lightningd/plugin_control.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2181627
When starting a plugin, if the plugin path cannot be found in
absolute context, assume it is a relative path to the default
plugins dir. As a result, the following now works when my_plugin.py
is installed in the default plugins dir:
lightning-cli plugin start my_plugin.py
Changelog-Added: plugin start RPC subcommand now assumes relative path to default plugins dir if the path is not found in absolute context. i.e. lightning-cli plugin start my_plugin.py