anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️
MIT License
6.9k stars 287 forks source link

Fix bug dispatching by dublicate plugins #353

Open valentino-sm opened 6 months ago

valentino-sm commented 6 months ago

Dotbot performs some monkeypatch during loading, where it scans plugin modules and collects every class that inherits from the Plugin interface. This makes it easy to collect the same class objects.

Plugins such as if, ifarch and ifplatform contain the following line of code: from dotbot.plugins import Clean, Create, Link, Shell This line is sufficient to collect duplicate plugins and dispatch the same configuration instructions twice.

See: https://github.com/ssbanerje/dotbot-ifplatform/pull/4#issuecomment-1532112176 https://github.com/anishathalye/dotbot/pull/351