diff --git a/src/tty.rs b/src/tty.rs index ea45135ecdbb3c74960732efd348392cce8eb4a2..c02d8e1b58a7d723048381b2096351dc20f11a79 100644 --- a/src/tty.rs +++ b/src/tty.rs @@ -20,6 +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> { + use std::env; fs::OpenOptions::new().read(true).write(true).open(try!(env::var("TTY"))) }