Files
rust/library/std/src
Matthias Krüger 538dcdad31 Rollup merge of #113787 - sanchopanca:process-command-windows-docs, r=ChrisDenton
Update documentation for std::process::Command's new method

In the current documentation, it's not specified that when creating a Command, the .exe extension can be omitted for Windows executables. However, for other types of executable files like .bat or .cmd, the complete filename including the extension must be provided.

I encountered it by noticing that `Command::new("wt").spawn().unwrap()` succeeds on my machine while `Command::new("code").spawn().unwrap()` panics. Turns out VS Code's entrypoint is .cmd file.

`resolve_exe` method mentions this behaviour in [a comment](https://github.com/rust-lang/rust/blob/e7fda447e7d05b6ca431fc8fe8f489b1fda810bc/library/std/src/sys/windows/process.rs#L425), but it makes sense to mention it at a more visible place.

I've added this clarification to the documentation, which should make it more accurate and helpful for Rust developers working on the Windows platform.
2023-07-20 07:08:42 +02:00
..
2023-07-12 20:10:52 +02:00
2022-08-01 20:10:40 +00:00
2022-12-11 01:20:18 -05:00
2022-12-11 01:20:18 -05:00
2023-07-12 21:24:05 -04:00
2022-08-18 18:07:39 -04:00
2023-04-27 15:56:57 +02:00
2023-05-03 22:09:33 -07:00
2022-09-26 10:14:45 +02:00
2023-07-09 17:32:26 -07:00
2023-07-09 17:32:26 -07:00
2023-07-19 14:10:07 +00:00
2023-06-21 01:08:10 +01:00
2023-04-29 19:04:16 +08:00