From 8bd46a6549e3dd7cde7e7dee1d3248d0e3bfcfd6 Mon Sep 17 00:00:00 2001 From: Wouter Franken Date: Sun, 19 Feb 2023 13:08:41 +0100 Subject: [PATCH] Fix dispatcher when no plugins are given When any plugin is using the dispatcher for nested actions it should pass all plugins again to avoid that any plugin as subtask would be handled. Currently this means a lot of plugins are broken because they don't pass plugins to the dispatcher. To fix this, take all Plugin subclasses when no plugin is given (we should at least have the default plugins). --- dotbot/dispatcher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dotbot/dispatcher.py b/dotbot/dispatcher.py index 76994c3..2b56783 100644 --- a/dotbot/dispatcher.py +++ b/dotbot/dispatcher.py @@ -18,7 +18,10 @@ class Dispatcher(object): ): self._log = Messenger() self._setup_context(base_directory, options) - plugins = plugins or [] + if plugins == None: + plugins = Plugin.__subclasses__() + else: + plugins = plugins or [] self._plugins = [plugin(self._context) for plugin in plugins] self._only = only self._skip = skip