summaryrefslogtreecommitdiff
path: root/runtime/ops/bootstrap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ops/bootstrap.rs')
-rw-r--r--runtime/ops/bootstrap.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/ops/bootstrap.rs b/runtime/ops/bootstrap.rs
index 1b86a7509..72e31a1d6 100644
--- a/runtime/ops/bootstrap.rs
+++ b/runtime/ops/bootstrap.rs
@@ -15,6 +15,7 @@ deno_core::extension!(
op_bootstrap_language,
op_bootstrap_log_level,
op_bootstrap_no_color,
+ op_bootstrap_is_tty,
],
);
@@ -57,5 +58,11 @@ pub fn op_bootstrap_log_level(state: &mut OpState) -> i32 {
#[op2(fast)]
pub fn op_bootstrap_no_color(state: &mut OpState) -> bool {
let options = state.borrow::<BootstrapOptions>();
- options.no_color || !options.is_tty
+ options.no_color
+}
+
+#[op2(fast)]
+pub fn op_bootstrap_is_tty(state: &mut OpState) -> bool {
+ let options = state.borrow::<BootstrapOptions>();
+ options.is_tty
}