Skip to content

Keep one environment variable per case-insensitive name on Windows - #381

Merged
slachiewicz merged 1 commit into
masterfrom
windows-env-name-case
Nov 29, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
windows-env-name-case

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

On Windows, Commandline passed two variables to the process when one was added in another spelling than the inherited one: inherited names arrive upper-cased, so addEnvironment("Path", …) left PATH in the environment as well. It now keeps one variable per case-insensitive name, whether the variable is added before or after the inherited ones, and the last spelling added wins. Other platforms are unchanged.

Verified: mvn test -Dtest=CommandlineEnvironmentTest -DargLine=-Dos.name=Windows on Linux → the 3 Windows tests fail without the Commandline change and pass with it

Inherited names arrive upper-cased, so an added Path used to leave PATH in the
environment as well, and which of the two the process saw was not defined.
Other platforms are unchanged.
@slachiewicz slachiewicz added the bug Something isn't working label Nov 24, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review November 24, 2026 20:45
@slachiewicz
slachiewicz merged commit 04d4227 into master Nov 29, 2026
15 checks passed
@slachiewicz
slachiewicz deleted the windows-env-name-case branch November 29, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant