Skip to content

Config::execute_command uses Unix PATH separators on Windows #227

Description

@dumanoglu1

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions