Skip to content

Windows: subprocess environment propagation breaks with includeParentEnvironment=false #3

@tsavo-at-pieces

Description

@tsavo-at-pieces

Problem

Several subprocess environment tests fail on Windows:

  • includes modifications to env
  • includes scoped modifications to env
  • includes values from the environment parameter
  • environment parameter overrides env
  • includeParentEnvironment: false ignores env
  • includeParentEnvironment: false uses environment parameter

Reproduction

Observed failure modes

  1. Case-sensitive key assertions fail (cli_script_test_* vs uppercase env keys on Windows).
  2. includeParentEnvironment: false path can fail with Windows process/environment semantics.

Expected behavior

  • Env assertions should work with Windows case-insensitive key semantics.
  • includeParentEnvironment: false should behave predictably on Windows and not fail process start due to invalid/minimal env block behavior.

Proposed approach

  1. Make env-related test assertions case-insensitive on Windows.
  2. Revisit env construction when includeParentEnvironment: false and environment is null/empty.
  3. Add dedicated Windows tests for:
    • explicit env override behavior
    • includeParentEnvironment=false with/without explicit env

Acceptance criteria

  • All six env-related failures pass on windows-x64 and windows-arm64
  • No regressions on Linux/macOS env tests
  • Documented Windows-specific environment semantics where behavior is intentionally different

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions