From f6bf3c362c893c209aa894058fb626416920b4d9 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 3 Apr 2026 15:35:43 -0500 Subject: [PATCH 1/2] fix: info and install commands fail when run with a vagrant shell provisioner Due to some environment quirk that I did not completely track down the command "script -qec systeminfo /dev/null" gives a retcode=0 when cf-remote is run via a vagrant shell provisioner. This causes the get_info() function to consider the host a windows box and so loses all of the pertinent system info that could be retrieved. Ticket: ENT-13848 Changelog: title --- cf_remote/remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cf_remote/remote.py b/cf_remote/remote.py index ff37d8a..5e1bcb1 100644 --- a/cf_remote/remote.py +++ b/cf_remote/remote.py @@ -216,7 +216,7 @@ def get_info(host, *, users=None, connection=None): data["ssh_user"] = user systeminfo = ssh_cmd(connection, "systeminfo") - if systeminfo: + if systeminfo and "command not found" not in systeminfo: data["os"] = "windows" data["systeminfo"] = parse_systeminfo(systeminfo) data["package_tags"] = ["x86_64", "msi"] From c8b316ace9f2d852ad7f24390c0c2ba3e5ad88bf Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 3 Apr 2026 15:39:02 -0500 Subject: [PATCH 2/2] fix: On windows clients the info and install commands will likely fail for having no role key in data Sadly, I can't test this because the info command breaks earlier: https://northerntech.atlassian.net/browse/ENT-13849 Ticket: none Changelog: title --- cf_remote/remote.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cf_remote/remote.py b/cf_remote/remote.py index 5e1bcb1..eeebdee 100644 --- a/cf_remote/remote.py +++ b/cf_remote/remote.py @@ -225,6 +225,7 @@ def get_info(host, *, users=None, connection=None): data["agent"] = agent version_cmd = powershell("{} -V".format(agent)) data["agent_version"] = parse_version(ssh_cmd(connection, version_cmd)) + data["role"] = "client" else: data["os"] = "unix"