Created
March 1, 2018 02:11
-
-
Save anonymous/ecf20b474c85f797d025094c1b9cfef9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/libstd/sys/unix/process/process_unix.rs b/src/libstd/sys/unix/process/process_unix.rs | |
index d66c237514..76397aef94 100644 | |
--- a/src/libstd/sys/unix/process/process_unix.rs | |
+++ b/src/libstd/sys/unix/process/process_unix.rs | |
@@ -327,7 +327,11 @@ impl Command { | |
if ret == 0 { | |
Ok(Some(p)) | |
} else { | |
- Err(io::Error::last_os_error()) | |
+ Err(if cfg!(target_os = "macos") { | |
+ io::Error::from_raw_os_error(ret) | |
+ } else { | |
+ io::Error::last_os_error() | |
+ }) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment