rust/library/std
Aleksandr Kovalev 5dea766dc9 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[1], but it
makes sense to mention it at 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.

[1] e7fda447e7/library/std/src/sys/windows/process.rs (L425)
2023-07-18 11:32:04 +02:00
..
benches
primitive_docs
src Update documentation for std::process::Command's new method 2023-07-18 11:32:04 +02:00
tests std: mark common functions in test crate pub(crate) 2023-05-25 08:15:04 -07:00
build.rs wip: Support Apple tvOS in libstd 2023-06-21 14:59:37 -07:00
Cargo.toml use latest version of hermit-abi 2023-07-12 13:15:09 +02:00