Skip to content

Fix cli-plan test failing on Windows#252

Open
brunoleemann-code wants to merge 1 commit intogetagentseal:mainfrom
brunoleemann-code:fix/windows-test-home-dir
Open

Fix cli-plan test failing on Windows#252
brunoleemann-code wants to merge 1 commit intogetagentseal:mainfrom
brunoleemann-code:fix/windows-test-home-dir

Conversation

@brunoleemann-code
Copy link
Copy Markdown

Summary

os.homedir() on Windows reads USERPROFILE, not HOME. The test was only setting HOME, so the CLI wrote config to the real home directory instead of the temp dir, causing the assertion to fail.

Fix: also set USERPROFILE, HOMEPATH, and HOMEDRIVE in the test's spawned process environment, matching what Windows actually uses.

Test plan

  • Run npx vitest run tests/cli-plan.test.ts on Windows — should pass (was failing before this fix)

os.homedir() on Windows uses USERPROFILE, not HOME. Set both env vars
in the test so the temp dir is respected as the home directory on all
platforms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant