test: fix windows environment and cleanup issues

- Ensure 'SystemRoot', 'COMSPEC', 'windir', and 'PATHEXT' are passed to node-pty on Windows to prevent 'posix_spawnp' failures.
- Clean up test directories in 'TestRig.setup' to ensure a fresh state for retries and prevent telemetry log accumulation (fixing the 1, 2, 3 failure pattern).
- Fix path normalization in 'Hook Disabling' test to ensure disabled hooks are correctly matched on Windows.

Part of https://github.com/google-gemini/gemini-cli/pull/18665
This commit is contained in:
Taylor Mullen
2026-02-09 23:18:02 -08:00
parent 3643c882ee
commit f54fe58d06
2 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -1831,7 +1831,7 @@ console.log(JSON.stringify({decision: "block", systemMessage: "Disabled hook sho
settings: {
hooksConfig: {
enabled: true,
disabled: [`node "${disabledPath}"`], // Disable the second hook
disabled: [normalizePath(`node "${disabledPath}"`)], // Disable the second hook
},
hooks: {
BeforeTool: [