fix(cli): handle null/non-dict display config in skin initialization
display: null or display: <non-dict> in config.yaml crashed skin init with AttributeError. Now falls back to default skin gracefully. Cherry-picked from #10867 by @Bartok9. Consolidates #10876 by @cola-runner. Co-authored-by: cola-runner <cola-runner@users.noreply.github.com>
This commit is contained in:
@@ -708,7 +708,9 @@ def init_skin_from_config(config: dict) -> None:
|
||||
|
||||
Call this once during CLI init with the loaded config dict.
|
||||
"""
|
||||
display = config.get("display", {})
|
||||
display = config.get("display") or {}
|
||||
if not isinstance(display, dict):
|
||||
display = {}
|
||||
skin_name = display.get("skin", "default")
|
||||
if isinstance(skin_name, str) and skin_name.strip():
|
||||
set_active_skin(skin_name.strip())
|
||||
|
||||
Reference in New Issue
Block a user