From 7e3ed4ec9330c168ce9b74593550adde4759d58f Mon Sep 17 00:00:00 2001 From: ticki Date: Fri, 29 Jul 2016 21:56:33 +0200 Subject: [PATCH] Fix Redox get_tty --- src/tty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty.rs b/src/tty.rs index 960f474..ea45135 100644 --- a/src/tty.rs +++ b/src/tty.rs @@ -20,7 +20,7 @@ pub fn is_tty(_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::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.