mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-23 19:08:22 -06:00
test: canonicalize macOS temporary workspace paths (#127366)
This commit is contained in:
committed by
GitHub
parent
0a20c57154
commit
4324ba2f48
@@ -170,7 +170,7 @@ export async function withTempDir<T>(
|
||||
prefix: string,
|
||||
run: (stateDir: string) => Promise<T>,
|
||||
): Promise<T> {
|
||||
const stateDir = await fs.mkdtemp(path.join(os.tmpdir(), prefix));
|
||||
const stateDir = await fs.realpath(await fs.mkdtemp(path.join(os.tmpdir(), prefix)));
|
||||
try {
|
||||
return await run(stateDir);
|
||||
} finally {
|
||||
|
||||
@@ -21,7 +21,9 @@ describe("skill_workshop collection restore", () => {
|
||||
prefix: "openclaw-skill-collection-restore-state-",
|
||||
});
|
||||
cleanups.push(async () => await testState.cleanup());
|
||||
const workspaceDir = await tempDirs.make("openclaw-skill-collection-restore-");
|
||||
const workspaceDir = await fs.realpath(
|
||||
await tempDirs.make("openclaw-skill-collection-restore-"),
|
||||
);
|
||||
const proposal = await proposeCreateSkill({
|
||||
workspaceDir,
|
||||
env: testState.env,
|
||||
|
||||
Reference in New Issue
Block a user