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

Duplicate directives when custom plugins import builtins #357

Open
aananiadis opened this issue Mar 4, 2024 · 0 comments
Open

Duplicate directives when custom plugins import builtins #357

aananiadis opened this issue Mar 4, 2024 · 0 comments

Comments

@aananiadis
Copy link

If a plugin is added that imports dotbot.plugins (such as dotbot-if) the built-in plugins will be included multiple times and then duplicate execution of the directives.

Example (tested with dotbot version 1.20.1):
With dotbot-if in dotbot-plugins directory, and the following config:

- shell:
    - description: Demo shell
      command: echo "Should run once"
$ dotbot/bin/dotbot -c test.conf.yaml -p dotbot-plugins/dotbot-if/if.py
Demo shell [echo "Should run once"]
All commands have been executed
Demo shell [echo "Should run once"]
All commands have been executed

==> All tasks executed successfully

Perhaps the Dispatcher should dedupe the plugin list, or plugin module loading could ignore builtins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant