From 515fb4c5a4d46d3727c12f42e5262a65407023da Mon Sep 17 00:00:00 2001 From: dgebert Date: Fri, 12 Jun 2026 17:11:05 +0200 Subject: [PATCH] fix: make hook compatibility test cross-platform (USERPROFILE for Windows os.homedir) Co-Authored-By: Claude Opus 4.8 --- tests/hooks.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/hooks.test.js b/tests/hooks.test.js index 540190c..072a1d9 100644 --- a/tests/hooks.test.js +++ b/tests/hooks.test.js @@ -21,8 +21,10 @@ const home = path.join(temp, 'home'); const pluginData = path.join(temp, 'plugin-data'); fs.mkdirSync(home, { recursive: true }); +// USERPROFILE alongside HOME: os.homedir() reads USERPROFILE on Windows, HOME on POSIX. const codexEnv = { HOME: home, + USERPROFILE: home, PLUGIN_DATA: pluginData, PONYTAIL_DEFAULT_MODE: 'ultra', }; @@ -60,6 +62,7 @@ assert.equal(output.systemMessage, 'PONYTAIL:OFF'); const claudeEnv = { HOME: home, + USERPROFILE: home, PONYTAIL_DEFAULT_MODE: 'full', }; delete claudeEnv.PLUGIN_DATA;