Skip to content
Snippets Groups Projects
Commit f9928bd6 authored by Jeremy Soller's avatar Jeremy Soller Committed by ticki
Browse files

Fix Redox `get_tty` by adding `env` import (#40)

parent 7e3ed4ec
No related branches found
No related tags found
No related merge requests found
......@@ -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")))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment