Skip to content

Commit 3a14f24

Browse files
committed
fix: scope bundled skills env
1 parent 5c36001 commit 3a14f24

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/skills/loading/workspace-bundled-allowlist.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from "node:fs/promises";
33
import os from "node:os";
44
import path from "node:path";
55
import { describe, expect, it } from "vitest";
6-
import { captureEnv } from "../../test-utils/env.js";
6+
import { captureEnv, deleteTestEnvValue, setTestEnvValue } from "../../test-utils/env.js";
77
import { writeSkill } from "../test-support/e2e-test-helpers.js";
88
import { buildWorkspaceSkillsPrompt } from "./workspace.js";
99

@@ -12,10 +12,10 @@ describe("buildWorkspaceSkillsPrompt", () => {
1212
const env = captureEnv(["HOME", "USERPROFILE", "OPENCLAW_HOME", "OPENCLAW_STATE_DIR"]);
1313
const workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-"));
1414
try {
15-
process.env.HOME = workspaceDir;
16-
process.env.USERPROFILE = workspaceDir;
17-
delete process.env.OPENCLAW_HOME;
18-
delete process.env.OPENCLAW_STATE_DIR;
15+
setTestEnvValue("HOME", workspaceDir);
16+
setTestEnvValue("USERPROFILE", workspaceDir);
17+
deleteTestEnvValue("OPENCLAW_HOME");
18+
deleteTestEnvValue("OPENCLAW_STATE_DIR");
1919
const bundledDir = path.join(workspaceDir, ".bundled");
2020
const bundledSkillDir = path.join(bundledDir, "peekaboo");
2121
const workspaceSkillDir = path.join(workspaceDir, "skills", "demo-skill");

0 commit comments

Comments
 (0)