Config::execute_command uses Unix PATH separators on Windows
- Langage dominant
- Rust
- Étoiles
- 8
- Forks
- 10
- Merge moyen
- 3 j 5 h
- PR mergées (30 j)
- 17
Description
`Config::execute_command` prepends directories to `PATH` with a hard-coded `:` separator:
- `src/config.rs` builds `format!("{}:", self.cargo_home.join("bin").display())` when `CARGO_HOME` differs from the inherited value.
- The same function later builds `format!("{}:", toolchain_opt.display())` before spawning the selected component.
This is correct on Unix, but Windows uses `;` as the PATH separator. On Windows, those prepended directories become part of one malformed PATH entry instead of separate searchable entries. That can prevent the spawned command from finding the active toolchain `opt/` shims or the intended `CARGO_HOME/bin`.
A small fix would be to build PATH values through `std::env::split_paths` / `std::env::join_paths` instead of formatting the separator by hand.
Duplicate check performed before filing:
- `repo:0xMiden/midenup is:issue is:open PATH Windows separator`
- `repo:0xMiden/midenup is:pr is:open PATH Windows separator`
- `repo:0xMiden/midenup is:open windows path`
- `repo:0xMiden/midenup is:open CARGO_HOME`
- `repo:0xMiden/midenup is:open toolchain opt PATH`
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.