Fix: Default to auto command for containers with only webterm-theme label

When containers have webterm-theme but no webterm-command label,
they should default to auto mode (Docker exec) instead of returning None.
This commit is contained in:
GitHub Copilot
2026-01-29 19:55:36 +00:00
parent 44fd7dcc19
commit 4efe3060cf
+2 -2
View File
@@ -149,14 +149,14 @@ class DockerWatcher:
def _get_container_command(self, container: dict) -> str:
"""Get command for container from label.
If label is 'auto', returns default exec command.
If label is 'auto', empty, or missing, returns default exec command.
"""
labels = container.get("Labels", {})
label_value = labels.get(LABEL_NAME)
if _is_auto_label(label_value):
return AUTO_COMMAND_SENTINEL
return label_value
return label_value or AUTO_COMMAND_SENTINEL
def _get_container_theme(self, container: dict) -> str | None:
labels = container.get("Labels", {})