rust/library
许杰友 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
..
alloc Auto merge of #137608 - fmease:rollup-h4siso6, r=fmease 2025-02-25 19:36:17 +00:00
backtrace@9d2c34e7e6 Update backtrace 2025-02-13 14:32:50 -08:00
core Rollup merge of #137551 - folkertdev:import-simd-intrinsics, r=RalfJung 2025-02-28 22:29:51 +08:00
coretests disable a potentially bogus test on Miri 2025-02-25 09:35:28 +01:00
panic_abort panic_abort: Apply unsafe_op_in_unsafe_fn 2025-02-14 07:36:17 -08:00
panic_unwind update cfg(bootstrap) 2025-02-18 09:32:44 -08:00
portable-simd Remove ignored #[must_use] attributes from portable-simd 2025-02-12 13:59:22 +01:00
proc_macro proc_macro: Apply unsafe_op_in_unsafe_fn 2025-02-14 07:36:17 -08:00
profiler_builtins compiler & tools dependencies: 2024-12-17 17:41:00 +00:00
rtstartup Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Rollup merge of #137673 - ChrisDenton:search-path-bug, r=dtolnay 2025-02-28 22:29:53 +08:00
stdarch@684de0d6fe Bump stdarch 2024-12-24 19:00:57 +01:00
sysroot Rollup merge of #135501 - tgross35:stdlib-dependencies-private, r=bjorn3 2025-02-23 00:16:18 +01:00
test Use public-dependencies in all sysroot crates 2025-02-21 17:37:03 +00:00
unwind update cfg(bootstrap) 2025-02-18 09:32:44 -08:00
windows_targets Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
Cargo.lock Update compiler-builtins to 0.1.148 2025-02-24 07:46:55 +00:00
Cargo.toml Put all coretests in a separate crate 2025-01-26 10:26:36 +00:00