Skip to content

Fix cli-plan test failing on Windows#252

Merged
iamtoruk merged 1 commit into
getagentseal:mainfrom
brunoleemann-code:fix/windows-test-home-dir
May 16, 2026
Merged

Fix cli-plan test failing on Windows#252
iamtoruk merged 1 commit into
getagentseal:mainfrom
brunoleemann-code:fix/windows-test-home-dir

Conversation

@brunoleemann-code
Copy link
Copy Markdown
Contributor

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.
@AgentSeal AgentSeal added the needs-validation PR requires validation against real-world usage before review label May 12, 2026
@iamtoruk iamtoruk merged commit 37fb7f9 into getagentseal:main May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-validation PR requires validation against real-world usage before review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants