Fix Windows exec env for Docker Desktop plugin discovery

nanobot's Windows exec environment was not forwarding ProgramFiles and related variables, so docker desktop start could not discover the desktop CLI plugin and reported unknown command. Forward the missing variables and add a regression test that covers the Windows env shape.
This commit is contained in:
chensp
2026-04-09 10:55:53 +08:00
committed by Xubin Ren
parent 3cc2ebeef7
commit bfec06a2c1
2 changed files with 17 additions and 1 deletions
+6
View File
@@ -218,6 +218,12 @@ class ExecTool(Tool):
"TMP": os.environ.get("TMP", f"{sr}\\Temp"),
"PATHEXT": os.environ.get("PATHEXT", ".COM;.EXE;.BAT;.CMD"),
"PATH": os.environ.get("PATH", f"{sr}\\system32;{sr}"),
"APPDATA": os.environ.get("APPDATA", ""),
"LOCALAPPDATA": os.environ.get("LOCALAPPDATA", ""),
"ProgramData": os.environ.get("ProgramData", ""),
"ProgramFiles": os.environ.get("ProgramFiles", ""),
"ProgramFiles(x86)": os.environ.get("ProgramFiles(x86)", ""),
"ProgramW6432": os.environ.get("ProgramW6432", ""),
}
home = os.environ.get("HOME", "/tmp")
return {