diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/msg.fbs | 1 | ||||
-rw-r--r-- | src/ops.rs | 14 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/msg.fbs b/src/msg.fbs index d7e71ab14..de69c31ad 100644 --- a/src/msg.fbs +++ b/src/msg.fbs @@ -160,6 +160,7 @@ table StartRes { version_flag: bool; deno_version: string; v8_version: string; + no_color: bool; } table WorkerGetMessage { diff --git a/src/ops.rs b/src/ops.rs index 86bc6efad..2b4136208 100644 --- a/src/ops.rs +++ b/src/ops.rs @@ -1,5 +1,7 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +use atty; +use crate::ansi; use crate::errors; use crate::errors::{DenoError, DenoResult, ErrorKind}; use crate::fs as deno_fs; @@ -18,8 +20,6 @@ use crate::resources::table_entries; use crate::resources::Resource; use crate::tokio_util; use crate::version; - -use atty; use flatbuffers::FlatBufferBuilder; use futures; use futures::Async; @@ -33,10 +33,6 @@ use std; use std::convert::From; use std::fs; use std::net::Shutdown; -#[cfg(unix)] -use std::os::unix::fs::PermissionsExt; -#[cfg(unix)] -use std::os::unix::process::ExitStatusExt; use std::path::Path; use std::path::PathBuf; use std::process::Command; @@ -48,6 +44,11 @@ use tokio::net::TcpStream; use tokio_process::CommandExt; use tokio_threadpool; +#[cfg(unix)] +use std::os::unix::fs::PermissionsExt; +#[cfg(unix)] +use std::os::unix::process::ExitStatusExt; + type OpResult = DenoResult<Buf>; // TODO Ideally we wouldn't have to box the Op being returned. @@ -266,6 +267,7 @@ fn op_start( version_flag: state.flags.version, v8_version: Some(v8_version_off), deno_version: Some(deno_version_off), + no_color: !ansi::use_color(), ..Default::default() }, ); |