diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2020-02-25 22:01:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 01:01:24 -0500 |
commit | 5946808f66aab1983ade3db2541734bb43626a72 (patch) | |
tree | adb526497a9efc29d1b5744ae52449f08f453ef0 /cli/ops/os.rs | |
parent | e53064c4f22efeb8a4eda2712e15c77d2699a686 (diff) |
tty: Deno.setRaw(rid, mode) to turn on/off raw mode (#3958)
Diffstat (limited to 'cli/ops/os.rs')
-rw-r--r-- | cli/ops/os.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/cli/ops/os.rs b/cli/ops/os.rs index c0479c656..2df9470dd 100644 --- a/cli/ops/os.rs +++ b/cli/ops/os.rs @@ -2,7 +2,6 @@ use super::dispatch_json::{Deserialize, JsonOp, Value}; use crate::op_error::OpError; use crate::state::State; -use atty; use deno_core::*; use std::collections::HashMap; use std::env; @@ -12,7 +11,6 @@ use url::Url; pub fn init(i: &mut Isolate, s: &State) { i.register_op("op_exit", s.stateful_json_op(op_exit)); - i.register_op("op_is_tty", s.stateful_json_op(op_is_tty)); i.register_op("op_env", s.stateful_json_op(op_env)); i.register_op("op_exec_path", s.stateful_json_op(op_exec_path)); i.register_op("op_set_env", s.stateful_json_op(op_set_env)); @@ -151,18 +149,6 @@ fn op_exit( std::process::exit(args.code) } -fn op_is_tty( - _s: &State, - _args: Value, - _zero_copy: Option<ZeroCopyBuf>, -) -> Result<JsonOp, OpError> { - Ok(JsonOp::Sync(json!({ - "stdin": atty::is(atty::Stream::Stdin), - "stdout": atty::is(atty::Stream::Stdout), - "stderr": atty::is(atty::Stream::Stderr), - }))) -} - fn op_loadavg( state: &State, _args: Value, |