Skip to content

Fix environment variables being overwritten when they match on prefix - #4966

Merged
AlanGriffiths merged 1 commit into
mainfrom
env-name-mismatch
May 28, 2026
Merged

Fix environment variables being overwritten when they match on prefix#4966
AlanGriffiths merged 1 commit into
mainfrom
env-name-mismatch

Conversation

@robert-ancell

Copy link
Copy Markdown
Contributor

Make sure to check for the '=' character to match the whole name.

Make sure to check for the '=' character to match the whole name.
Copilot AI review requested due to automatic review settings May 27, 2026 22:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses incorrect environment variable matching in MirAL’s app-launch environment handling, ensuring that updates/unsets only apply to the exact variable name (not variables that merely share a prefix).

Changes:

  • Introduces a helper to match environment entries by full variable name by requiring an = delimiter.
  • Updates Environment::setenv() and Environment::unsetenv() to use the helper for exact-name matching.

Comment thread src/miral/launch_app.cpp
Comment thread src/miral/launch_app.cpp
@AlanGriffiths
AlanGriffiths added this pull request to the merge queue May 28, 2026
Merged via the queue into main with commit cd24d18 May 28, 2026
55 checks passed
@AlanGriffiths
AlanGriffiths deleted the env-name-mismatch branch May 28, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants