From c782907de8a338fb73c3cd986c91e096565c91cb Mon Sep 17 00:00:00 2001 From: brunoleemann-code Date: Wed, 6 May 2026 18:40:03 +0200 Subject: [PATCH] Fix cli-plan test failing on Windows 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. --- tests/cli-plan.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/cli-plan.test.ts b/tests/cli-plan.test.ts index b146f2a..1430eb7 100644 --- a/tests/cli-plan.test.ts +++ b/tests/cli-plan.test.ts @@ -11,6 +11,9 @@ function runCli(args: string[], home: string) { env: { ...process.env, HOME: home, + USERPROFILE: home, // os.homedir() uses USERPROFILE on Windows + HOMEPATH: home, + HOMEDRIVE: '', }, encoding: 'utf-8', })