Skip to content

Commit 81e2eba

Browse files
committed
test: isolate Windows home in publication tests
Set HOME and USERPROFILE together for CLI and MCP publication setups. Review: #3760 (comment)
1 parent 73faf74 commit 81e2eba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/__tests__/cli-record-publication.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ test.each([false, true])(
5353
const publication = repairPublication(root);
5454
const result = await runCliCapture(['snapshot', '--json', ...(explicit ? ['--record'] : [])], {
5555
cwd: project,
56-
env: { HOME: home },
56+
env: { HOME: home, USERPROFILE: home },
5757
sendToDaemon: publication.transport,
5858
});
5959
expect(result.calls).toHaveLength(1);
@@ -68,7 +68,7 @@ test.each([false, true])(
6868
const { root, home, project } = makeTempWorkspace();
6969
fs.writeFileSync(path.join(project, 'agent-device.json'), JSON.stringify({ record: true }));
7070
const publication = repairPublication(root);
71-
const restoreEnv = installIsolatedCliTestEnv({ HOME: home });
71+
const restoreEnv = installIsolatedCliTestEnv({ HOME: home, USERPROFILE: home });
7272
const previousCwd = process.cwd();
7373
process.chdir(project);
7474
try {

0 commit comments

Comments
 (0)