diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-20 07:08:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-20 07:08:42 +0200 |
| commit | 538dcdad31dbbc6334d8d775a426894c433ee7aa (patch) | |
| tree | c0f30e0bbc6a5e16ebc0ef0b6099b9a68667b983 /library/std/src/sys/unix/process/process_unix.rs | |
| parent | 8027dd95cf37e7bb9ad54541f5fa5460805380a7 (diff) | |
| parent | 5dea766dc98d05b4a3a933eb0998a5686d48cc76 (diff) | |
| download | rust-538dcdad31dbbc6334d8d775a426894c433ee7aa.tar.gz rust-538dcdad31dbbc6334d8d775a426894c433ee7aa.zip | |
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.
Diffstat (limited to 'library/std/src/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions
