Skip to content

Commit 82254ae

Browse files
Changed _find_paired to assume cf-hub is installed if role of host is hub
Since the path of cf-hub is not set in the host/data-config, we can not extract binary path, so assume hub is installed and path resolves correctly
1 parent 18fb037 commit 82254ae

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/cfengine_cli/cfengine_wrapper/cfengine_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ def _find_all_paired() -> list[Installation]:
140140
if not data:
141141
continue
142142
agent_path = data.get("agent")
143-
hub_path = data.get("hub")
143+
# If role is hub, assume hub exists and path resolves correctly
144+
is_hub = data.get("role") == "hub"
145+
hub_path = "cf-hub" if is_hub else None
144146
if agent_path and hub_path:
145147
installations.append(
146148
Installation(

0 commit comments

Comments
 (0)