test: stabilize non-interactive env hook

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Victor Sumner
2026-01-18 20:39:02 -05:00
parent fca30546f9
commit 4e8106b019

View File

@@ -12,12 +12,15 @@ describe("non-interactive-env hook", () => {
originalEnv = {
SHELL: process.env.SHELL,
PSModulePath: process.env.PSModulePath,
CI: process.env.CI,
OPENCODE_NON_INTERACTIVE: process.env.OPENCODE_NON_INTERACTIVE,
}
// #given clean Unix-like environment for all tests
// This prevents CI environments (which may have PSModulePath set) from
// triggering PowerShell detection in tests that expect Unix behavior
delete process.env.PSModulePath
process.env.SHELL = "/bin/bash"
process.env.OPENCODE_NON_INTERACTIVE = "true"
})
afterEach(() => {