Open xusheng6 opened 2 years ago
Snippets can be triggered via the action system so maybe having them load in headless is worth keeping? Not sure. I'm not against disabling it though.
That said, unit tests should always be run with BNDISABLE PLUGINS set anyway fwiw.
Currently, I observe that the snippets plugin is also loaded in headless mode. I observed this when I try to run the BN unit tests. While this is related to https://github.com/Vector35/binaryninja-api/issues/1556, but it is different. Python plugins are too flexible and BN have no way of differentiating core/UI plugins, so the plugin itself should detect whether it is running in headless mode and decide whether it should load.
binaryninja.core_ui_enabled()
should fit the purpose.