j
This commit is contained in:
15
CLI.py
15
CLI.py
@@ -798,10 +798,9 @@ class CmdletIntrospection:
|
||||
@staticmethod
|
||||
def store_choices(config: Dict[str, Any]) -> List[str]:
|
||||
try:
|
||||
# Use config-only helper to avoid instantiating backends during completion
|
||||
from Store.registry import list_configured_backend_names
|
||||
|
||||
return list(list_configured_backend_names(config) or [])
|
||||
# Use the cached startup check from SharedArgs
|
||||
from cmdlet._shared import SharedArgs
|
||||
return SharedArgs.get_store_choices(config)
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
@@ -4206,6 +4205,14 @@ class MedeiaCLI:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Initialize the store choices cache at startup (filters disabled stores)
|
||||
try:
|
||||
from cmdlet._shared import SharedArgs
|
||||
config = self._config_loader.load()
|
||||
SharedArgs._refresh_store_choices_cache(config)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
self._cmdlet_executor = CmdletExecutor(config_loader=self._config_loader)
|
||||
self._pipeline_executor = PipelineExecutor(config_loader=self._config_loader)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user