diff --git a/cmd/hwlab-agent-mgr/main.test.ts b/cmd/hwlab-agent-mgr/main.test.ts index cc7581b9..178b0a81 100644 --- a/cmd/hwlab-agent-mgr/main.test.ts +++ b/cmd/hwlab-agent-mgr/main.test.ts @@ -8,7 +8,7 @@ import test from "node:test"; import { promisify } from "node:util"; const execFileAsync = promisify(execFile); -const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || "/root/.bun/bin/bun"; +const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || process.env.HWLAB_BUN_COMMAND || (process.versions.bun ? process.execPath : "bun"); test("agent manager CLI reports degraded skills and manages local session lifecycle", async () => { const stateDir = await mkdtemp(path.join(os.tmpdir(), "hwlab-agent-mgr-")); diff --git a/cmd/hwlab-agent-worker/main.test.ts b/cmd/hwlab-agent-worker/main.test.ts index 1d934665..d54d776f 100644 --- a/cmd/hwlab-agent-worker/main.test.ts +++ b/cmd/hwlab-agent-worker/main.test.ts @@ -7,7 +7,7 @@ import test from "node:test"; import { promisify } from "node:util"; const execFileAsync = promisify(execFile); -const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || "/root/.bun/bin/bun"; +const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || process.env.HWLAB_BUN_COMMAND || (process.versions.bun ? process.execPath : "bun"); test("agent worker health and dry-run preserve session evidence and cleanup behavior", async () => { const stateDir = await mkdtemp(path.join(os.tmpdir(), "hwlab-agent-worker-")); diff --git a/cmd/hwlab-codex-api-responses-forwarder/main.test.ts b/cmd/hwlab-codex-api-responses-forwarder/main.test.ts index d48ac5b8..9d2a5267 100644 --- a/cmd/hwlab-codex-api-responses-forwarder/main.test.ts +++ b/cmd/hwlab-codex-api-responses-forwarder/main.test.ts @@ -3,7 +3,7 @@ import { spawn } from "node:child_process"; import { createServer } from "node:http"; import test from "node:test"; -const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || "/root/.bun/bin/bun"; +const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || process.env.HWLAB_BUN_COMMAND || (process.versions.bun ? process.execPath : "bun"); test("Codex API Responses forwarder maps loopback Codex paths to configurable upstream and preserves stream body", async () => { const upstream = await startUpstream(); diff --git a/cmd/hwlab-deepseek-responses-bridge/main.test.ts b/cmd/hwlab-deepseek-responses-bridge/main.test.ts index 93b48b07..9db14efc 100644 --- a/cmd/hwlab-deepseek-responses-bridge/main.test.ts +++ b/cmd/hwlab-deepseek-responses-bridge/main.test.ts @@ -3,7 +3,7 @@ import { spawn } from "node:child_process"; import { createServer } from "node:http"; import test from "node:test"; -const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || "/root/.bun/bin/bun"; +const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || process.env.HWLAB_BUN_COMMAND || (process.versions.bun ? process.execPath : "bun"); const zstdPayload = Buffer.from([ 0x28, 0xb5, 0x2f, 0xfd, 0x04, 0x58, 0x75, 0x03, 0x00, 0x32, 0x47, 0x16, diff --git a/cmd/hwlab-device-pod/main.test.ts b/cmd/hwlab-device-pod/main.test.ts index ad072ad5..62315364 100644 --- a/cmd/hwlab-device-pod/main.test.ts +++ b/cmd/hwlab-device-pod/main.test.ts @@ -3,7 +3,7 @@ import { spawn } from "node:child_process"; import { createServer } from "node:http"; import test from "node:test"; -const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || "/root/.bun/bin/bun"; +const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || process.env.HWLAB_BUN_COMMAND || (process.versions.bun ? process.execPath : "bun"); test("device pod fake service exposes health, list, status, events, and method guards", async () => { const service = await startDevicePod("device-pod-test"); diff --git a/cmd/hwlab-edge-proxy/main.test.ts b/cmd/hwlab-edge-proxy/main.test.ts index 6edf9e9d..1e1a95f8 100644 --- a/cmd/hwlab-edge-proxy/main.test.ts +++ b/cmd/hwlab-edge-proxy/main.test.ts @@ -3,7 +3,7 @@ import { spawn } from "node:child_process"; import { createServer } from "node:http"; import test from "node:test"; -const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || "/root/.bun/bin/bun"; +const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || process.env.HWLAB_BUN_COMMAND || (process.versions.bun ? process.execPath : "bun"); test("edge proxy reports local health and proxies live health to upstream", async () => { const upstream = await startUpstream(); diff --git a/web/hwlab-cloud-web/scripts/check.ts b/web/hwlab-cloud-web/scripts/check.ts index bd3e8eb8..59794e92 100644 --- a/web/hwlab-cloud-web/scripts/check.ts +++ b/web/hwlab-cloud-web/scripts/check.ts @@ -7,7 +7,7 @@ import { assertCloudWebDistFresh, buildCloudWebDist, readCloudWebAppSource } fro const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); const repoRoot = path.resolve(rootDir, "../.."); -const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || "/root/.bun/bin/bun"; +const bunCommand = process.env.HWLAB_TEST_BUN_COMMAND || process.env.HWLAB_BUN_COMMAND || (process.versions.bun ? process.execPath : "bun"); const requiredFiles = Object.freeze([ "index.html",