Closed
Description
Running Command
with env_clear
will reproducibly result in Error with OS code 87.
> cargo script -e '::std::process::Command::new(\"gcc.exe\").env_clear().output(
).unwrap()'
Compiling expr v0.1.0 (file:///C:/Users/drk/AppData/Local/Cargo/script-cache/
expr-37b14ef2470ffe18)
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Error
{ repr: Os { code: 87, message: "The parameter is incorrect." } }', ../src/libco
re\result.rs:688
An unknown error occurred
if env_clear
is omitted, it works:
To learn more, run the command again with --verbose.
> cargo script -e '::std::process::Command::new(\"gcc.exe\").output().unwrap()'
Compiling expr v0.1.0 (file:///C:/Users/drk/AppData/Local/Cargo/script-cache/
expr-67fa84126914720e)
Output { status: ExitStatus(ExitStatus(1)), stdout: "", stderr: "gcc.exe: fatal
error: no input files\r\ncompilation terminated.\r\n" }