0xMiden / 0xMiden/midenup

Config::execute_command uses Unix PATH separators on Windows

Ouverte
#227 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
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.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.