fix(runtime): disable console color for non tty stdout (#13782)

This commit is contained in:
Antonio Musolino 2022-03-01 04:37:50 +01:00 committed by GitHub
parent a41d399f5f
commit 6a030a5396
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 2 deletions

View file

@ -15,6 +15,7 @@ pub struct BootstrapOptions {
pub location: Option<ModuleSpecifier>,
/// Sets `Deno.noColor` in JS runtime.
pub no_color: bool,
pub is_tty: bool,
/// Sets `Deno.version.deno` in JS runtime.
pub runtime_version: String,
/// Sets `Deno.version.typescript` in JS runtime.
@ -33,6 +34,7 @@ impl BootstrapOptions {
"denoVersion": self.runtime_version,
"location": self.location,
"noColor": self.no_color,
"isTty": self.is_tty,
"tsVersion": self.ts_version,
"unstableFlag": self.unstable,
// Web worker only