From 84d9e19da29df71ed04e19a3250353e596da23a1 Mon Sep 17 00:00:00 2001 From: Tobias Rosskopf <42942019+TobiasRosskopf@users.noreply.github.com> Date: Fri, 12 Jun 2026 10:20:18 +0200 Subject: [PATCH 1/2] Use plugin path from configuration file if available in `deploy_files` function. --- pb_tool/pb_tool.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pb_tool/pb_tool.py b/pb_tool/pb_tool.py index 5039572..e15c942 100644 --- a/pb_tool/pb_tool.py +++ b/pb_tool/pb_tool.py @@ -139,7 +139,11 @@ def deploy_files(config_file, plugin_path, confirm=True, quick=False, build_help click.secho("Configuration file {0} is missing.".format(config_file), fg="red") else: cfg = get_config(config_file) - if not plugin_path: + + plugin_path = cfg.get('plugin', 'plugin_path', fallback=None) + if plugin_path: + click.secho("Using plugin directory from pb_tool.cfg", fg='green') + else: plugin_path = get_plugin_directory() if not plugin_path: click.secho("Unable to determine where to deploy your plugin", fg="red") From 2f5f434cb41515212d86b43297714d0055d9efed Mon Sep 17 00:00:00 2001 From: Tobias Rosskopf <42942019+TobiasRosskopf@users.noreply.github.com> Date: Fri, 12 Jun 2026 10:36:35 +0200 Subject: [PATCH 2/2] Preserve precedence of the command-line option (--plugin_path) over the configuration file. --- pb_tool/pb_tool.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pb_tool/pb_tool.py b/pb_tool/pb_tool.py index e15c942..c65558a 100644 --- a/pb_tool/pb_tool.py +++ b/pb_tool/pb_tool.py @@ -140,10 +140,11 @@ def deploy_files(config_file, plugin_path, confirm=True, quick=False, build_help else: cfg = get_config(config_file) - plugin_path = cfg.get('plugin', 'plugin_path', fallback=None) - if plugin_path: + if not plugin_path: + plugin_path = cfg.get('plugin', 'plugin_path', fallback=None) click.secho("Using plugin directory from pb_tool.cfg", fg='green') - else: + + if not plugin_path: plugin_path = get_plugin_directory() if not plugin_path: click.secho("Unable to determine where to deploy your plugin", fg="red")