rust/library/std
许杰友 Jieyou Xu (Joe) 4606610b21
Rollup merge of #137673 - ChrisDenton:search-path-bug, r=dtolnay
Fix Windows `Command` search path bug

Currently `Command::new` on Windows works differently depending on whether any environment variable is set. For example,

```rust
// Searches for "myapp" in the application and system paths first (aka Windows native behaviour).
Command::new("myapp").spawn();

// Search for "myapp" in `PATH` first
Command::new("myapp").env("a", "b").spawn();
```

This is a bug because the search path should only change if `PATH` is changed for the child (i.e. `.env("PATH", "...")`).

This was discussed in a libs-api meeting where the exact semantics of `Command::new` was not decided but there seemed to be broad agreement that this particular thing is just a bug that can be fixed.

r? libs-api
2025-02-28 22:29:53 +08:00
..
benches Fix import in bench for wasm 2025-02-12 14:44:30 -08:00
src Rollup merge of #137673 - ChrisDenton:search-path-bug, r=dtolnay 2025-02-28 22:29:53 +08:00
tests std: Apply deprecated_safe_2024 2025-02-13 13:10:28 -08:00
build.rs Enable f16 for MIPS 2025-02-20 11:34:48 +01:00
Cargo.toml Update compiler-builtins to 0.1.148 2025-02-24 07:46:55 +00:00