Add exec command for Windows (#11001)

# Description
Based of the work and discussion in #10844, this PR adds the `exec`
command for Windows. This is done by simply spawning a
`std::process::Command` and then immediately exiting via
`std::process::exit` once the child process is finished. The child
process's exit code is passed to `exit`.

# User-Facing Changes
The `exec` command is now available on Windows, and there should be no
change in behaviour for Unix systems.
This commit is contained in:
Ian Manske
2023-11-08 20:50:25 +00:00
committed by GitHub
parent 59ea28cf06
commit 1fd3bc1ba6
4 changed files with 41 additions and 33 deletions

View File

@ -24,7 +24,6 @@ mod echo;
mod empty;
mod error_make;
mod every;
#[cfg(not(windows))]
mod exec;
mod export_def;
mod fill;