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:
parent
fca30546f9
commit
4e8106b019
@ -12,12 +12,15 @@ describe("non-interactive-env hook", () => {
|
|||||||
originalEnv = {
|
originalEnv = {
|
||||||
SHELL: process.env.SHELL,
|
SHELL: process.env.SHELL,
|
||||||
PSModulePath: process.env.PSModulePath,
|
PSModulePath: process.env.PSModulePath,
|
||||||
|
CI: process.env.CI,
|
||||||
|
OPENCODE_NON_INTERACTIVE: process.env.OPENCODE_NON_INTERACTIVE,
|
||||||
}
|
}
|
||||||
// #given clean Unix-like environment for all tests
|
// #given clean Unix-like environment for all tests
|
||||||
// This prevents CI environments (which may have PSModulePath set) from
|
// This prevents CI environments (which may have PSModulePath set) from
|
||||||
// triggering PowerShell detection in tests that expect Unix behavior
|
// triggering PowerShell detection in tests that expect Unix behavior
|
||||||
delete process.env.PSModulePath
|
delete process.env.PSModulePath
|
||||||
process.env.SHELL = "/bin/bash"
|
process.env.SHELL = "/bin/bash"
|
||||||
|
process.env.OPENCODE_NON_INTERACTIVE = "true"
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user