Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "indicatif"
version = "0.18.5"
version = "0.18.6"
edition = "2021"
rust-version = "1.85"
description = "A progress bar and cli reporting library for Rust"
Expand All @@ -13,7 +13,7 @@ readme = "README.md"
exclude = ["screenshots/*"]

[dependencies]
console = { version = "0.16", default-features = false, features = ["ansi-parsing", "std"] }
console = { version = "0.16.4", default-features = false, features = ["ansi-parsing", "std"] }
futures-core = { version = "0.3", default-features = false, optional = true }
unit-prefix = "0.5.1"
portable-atomic = "1.12.0"
Expand Down
11 changes: 3 additions & 8 deletions src/draw_target.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use std::io;
use std::ops::{Add, AddAssign, Sub};
use std::slice::SliceIndex;
use std::sync::{Arc, RwLock, RwLockWriteGuard};
use std::thread::panicking;
use std::time::Duration;
#[cfg(not(target_arch = "wasm32"))]
use std::time::Instant;
use std::{env, io};

#[cfg(feature = "unicode-width")]
use console::AnsiCodeIterator;
use console::{Term, TermTarget};
use console::{is_dumb, Term, TermTarget};
#[cfg(feature = "unicode-width")]
use unicode_width::UnicodeWidthChar;
#[cfg(all(target_arch = "wasm32", feature = "wasmbind"))]
Expand Down Expand Up @@ -77,12 +77,7 @@ impl ProgressDrawTarget {
///
/// Will panic if `refresh_rate` is `0`.
pub fn term(term: Term, refresh_rate: u8) -> Self {
let term_is_dumb_or_unset = match env::var("TERM") {
Ok(term) => term == "dumb",
Err(_) => true,
};

if !term.is_term() || term_is_dumb_or_unset {
if !term.is_term() || is_dumb() {
return Self::hidden();
}
Self {
Expand Down
Loading