[IsolationSession] A `process.env` entry without `=` is set as an empty variable
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in build_process_options in src/mxc-sdk/src/backends/isolation_session/common/process_options.rs, where each env entry is split at its first =. Compare with env_pairs in src/mxc-sdk/src/core/mxc_common/default_env.rs, which drops entries without =. Then check that build_pty_process_options inherits the fix. Done when a bare FOO entry leaves the default variable unchanged, such as TEMP, and FOO= still sets an empty value.
Written by the indexing model from the issue text.
Description
Relevant area(s)
Windows
Brief description of your issue
The IsolationSession backend passes a process.env entry that has no =, such as FOO, as the variable FOO with an empty value (src/mxc-sdk/src/backends/isolation_session/common/process_options.rs :: build_process_options). Bubblewrap, ProcessContainer, Seatbelt and WSLc drop such an entry because it names no variable, as the shared src/mxc-sdk/src/core/mxc_common/default_env.rs :: env_pairs does.
Steps to reproduce
Read from the code at d22e3515; not run.
build_process_optionssplits each entry at its first=and gives an entry without one an empty value, soFOOandFOO=both become("FOO", "").- The backend accepts
process.envonly withprocess.inheritDefaultEnv: true, which layers the entries over the default environment. build_pty_process_optionsstarts frombuild_process_options, so PTY runs do the same.
Expected behavior
A bare entry leaves the process's environment unchanged, as on Bubblewrap, ProcessContainer, Seatbelt and WSLc.
Actual behavior
The process gets the variable with an empty value, so a bare entry that names a default variable, such as TEMP, empties it.
- Dominant language
- Rust
- Stars
- 3.1k
- Forks
- 171
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 86
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/mxc
-
Backend-WSLC Issue-Docs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Backend-IsolationSession Issue-Docs OS-Windows
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
Backend-Seatbelt Issue-Docs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
Area-Node-SDK Issue-Task
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
Area-Build Issue-Bug OS-Windows
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
Similar issues
-
An EXE started from the shell with MAXALLOC FFFFh leaves a 0-paragraph free block after its ownOpenbug low-priority
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
dividebysandwich/rust-dos#629 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
eliasstravik/herdr-projects#758 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement needs:sonnet ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day