fix: tighten Windows adapter command handling

This commit is contained in:
online5880
2026-03-09 22:08:50 +09:00
parent d7b98a72b4
commit f4a9788f2d
4 changed files with 18 additions and 6 deletions

View File

@@ -61,6 +61,7 @@
"@types/node": "^24.6.0",
"@types/supertest": "^6.0.2",
"@types/ws": "^8.18.1",
"cross-env": "^10.1.0",
"supertest": "^7.0.0",
"tsx": "^4.19.2",
"typescript": "^5.7.3",

View File

@@ -4,6 +4,8 @@ import os from "node:os";
import path from "node:path";
import { testEnvironment } from "@paperclipai/adapter-codex-local/server";
const itWindows = process.platform === "win32" ? it : it.skip;
describe("codex_local environment diagnostics", () => {
it("creates a missing working directory when cwd is absolute", async () => {
const cwd = path.join(
@@ -30,9 +32,7 @@ describe("codex_local environment diagnostics", () => {
await fs.rm(path.dirname(cwd), { recursive: true, force: true });
});
it("runs the hello probe when Codex is available via a Windows .cmd wrapper", async () => {
if (process.platform !== "win32") return;
itWindows("runs the hello probe when Codex is available via a Windows .cmd wrapper", async () => {
const root = path.join(
os.tmpdir(),
`paperclip-codex-local-probe-${Date.now()}-${Math.random().toString(16).slice(2)}`,