Skip to content

Calling non-MSYS programs passes invalid env #320

@RivenSkaye

Description

@RivenSkaye

I originally opened this issue in swiftlang/swift#84428 but compnerd made a very valid statement about Windows being case insensitive with the environment.

MSYS2 shells have a case sensitive environment, and they pass this to programs being called as well. This is usually not a problem by either sheer coincidence or the key/value nature of handling the env. But some programs that don't live inside MSYS2 that do happen to get called end up crashing on the key already existing (after normalization).

The existing interop story for MSYS2 already does some mangling of the environments and paths, so perhaps cleaning up the environment for programs that don't live under MSYS2 could be part of this? For reliable behavior, always passing the last defined value for an env var would seem like the best option to ensure behavior like overriding the value on the command line or in scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions