// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use std::old_io::{Command, IoError, OtherIoError};
+use std::io;
+use std::process::Command;
use target::TargetOptions;
use self::Arch::*;
.arg("--show-sdk-path")
.arg("-sdk")
.arg(sdk_name)
- .spawn()
- .and_then(|c| c.wait_with_output())
+ .output()
.and_then(|output| {
if output.status.success() {
- Ok(String::from_utf8(output.output).unwrap())
+ Ok(String::from_utf8(output.stdout).unwrap())
} else {
- Err(IoError {
- kind: OtherIoError,
- desc: "process exit with error",
- detail: String::from_utf8(output.error).ok()})
+ let error = String::from_utf8(output.stderr);
+ Err(io::Error::new(io::ErrorKind::Other,
+ "process exit with error",
+ error.ok()))
}
});
//! Bindings for executing child processes
#![allow(non_upper_case_globals)]
+#![unstable(feature = "old_io")]
+#![deprecated(since = "1.0.0",
+ reason = "replaced with the std::process module")]
pub use self::StdioContainer::*;
pub use self::ProcessExit::*;