huge refactor of plugin system
This commit is contained in:
@@ -103,6 +103,17 @@ def _register_native_commands() -> None:
|
||||
pass
|
||||
|
||||
|
||||
def _register_plugin_commands() -> None:
|
||||
try:
|
||||
from ProviderCore.commands import register_plugin_commands
|
||||
except Exception:
|
||||
return
|
||||
try:
|
||||
register_plugin_commands(REGISTRY)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def ensure_cmdlet_modules_loaded(force: bool = False) -> None:
|
||||
global _MODULES_LOADED
|
||||
|
||||
@@ -115,4 +126,5 @@ def ensure_cmdlet_modules_loaded(force: bool = False) -> None:
|
||||
_load_root_modules()
|
||||
_load_helper_modules()
|
||||
_register_native_commands()
|
||||
_register_plugin_commands()
|
||||
_MODULES_LOADED = True
|
||||
|
||||
Reference in New Issue
Block a user