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
+2 -8
View File
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server"
import { execFile } from "node:child_process"
import { hostname, networkInterfaces } from "node:os"
import { promisify } from "node:util"
import { HOST_PATH, NEMOCLAW_BIN, NODE_BIN, OPENSHELL_BIN } from "@/app/lib/hostCommands"
import { HOST_PATH, NEMOCLAW_BIN, NODE_BIN, OPENSHELL_BIN, hostCommandEnv } from "@/app/lib/hostCommands"
import { resolveRuntimeAuthority } from "@/app/lib/runtimeAuthority"
const execFileAsync = promisify(execFile)
@@ -164,13 +164,7 @@ async function execNemoclaw(args: string[]) {
async function execOpenShell(args: string[]) {
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, args, {
env: {
...process.env,
PATH: HOST_PATH,
NO_COLOR: "1",
CLICOLOR: "0",
CLICOLOR_FORCE: "0",
},
env: hostCommandEnv(),
})
return { stdout, stderr }