Fix Redox get_tty

This commit is contained in:
ticki 2016-07-29 21:56:33 +02:00
parent 07301d4c24
commit 7e3ed4ec93
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ pub fn is_tty<T: AsRawFd>(_stream: T) -> bool {
/// This allows for getting stdio representing _only_ the TTY, and not other streams.
#[cfg(target_os = "redox")]
pub fn get_tty() -> io::Result<fs::File> {
fs::OpenOptions::new().read(true).write(true).open(env::var("TTY")?)
fs::OpenOptions::new().read(true).write(true).open(try!(env::var("TTY")))
}
/// Get the TTY device.