ssbc / secret-stack

connect peers to each other using secret-handshakes
MIT License
90 stars 19 forks source link

Change loading an already loaded plugin from error to warning #43

Closed arj03 closed 5 years ago

arj03 commented 5 years ago

I wanted to make it so that ssb-minimal-pub-server loads the plugins needed for peer-invites by default, thus making it easier to configure. But found that if they had already been installed in ~/.ssb/plugins that it would just die. Seems as if it should be safe enough to just throw a warning instead of hard failing in such a case.

staltz commented 5 years ago

Yeah, I agree with this

arj03 commented 5 years ago

Great, thanks @staltz!

dominictarr commented 5 years ago

yes - if it already has that plugin name, it logs a warning, and does not use the passed plugin. this works. loadUserPlugins should really also skip any plugins that were already loaded.