Use OpenShell config home for host commands

This commit is contained in:
Codex
2026-04-28 16:24:51 +00:00
parent 33510bba85
commit 476d3a96bb
13 changed files with 82 additions and 97 deletions
+3 -8
View File
@@ -1,6 +1,6 @@
import { execFile } from "node:child_process"
import { promisify } from "node:util"
import { HOST_PATH, OPENSHELL_BIN } from "./hostCommands"
import { HOST_PATH, OPENSHELL_BIN, hostCommandEnv } from "./hostCommands"
import { resolveSandboxRef } from "./openshellHost"
const execFileAsync = promisify(execFile)
@@ -36,15 +36,10 @@ function normalizeProxyOrigin(value: string) {
async function runOpenShell(args: string[]) {
const { stdout } = await execFileAsync(OPENSHELL_BIN, args, {
env: {
...process.env,
PATH: HOST_PATH,
env: hostCommandEnv({
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
NO_COLOR: "1",
CLICOLOR: "0",
CLICOLOR_FORCE: "0",
TERM: "dumb",
},
}),
timeout: 15000,
maxBuffer: 1024 * 1024,
})