msys2 / msys2/msys2-runtime

Calling non-MSYS programs passes invalid env

Open
#320 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
240
Forks
60
Avg merge
2d 3h
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is identified in the issue. Start by locating the MSYS2 environment and path interop handling for programs outside MSYS2, then define and test the expected behavior when case-insensitive environment names collide, including which value is retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.