diff options
Diffstat (limited to 'src/commands/cmd_list.rs')
-rw-r--r-- | src/commands/cmd_list.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/cmd_list.rs b/src/commands/cmd_list.rs index cb352916..63eba7e9 100644 --- a/src/commands/cmd_list.rs +++ b/src/commands/cmd_list.rs @@ -1,4 +1,3 @@ -use atty::Stream; use log::{error}; use bch_bindgen::bcachefs; use bch_bindgen::opt_set; @@ -9,6 +8,7 @@ use bch_bindgen::btree::BtreeIter; use bch_bindgen::btree::BtreeNodeIter; use bch_bindgen::btree::BtreeIterFlags; use clap::{Parser}; +use std::io::{stdout, IsTerminal}; fn list_keys(fs: &Fs, opt: Cli) -> anyhow::Result<()> { let trans = BtreeTrans::new(fs); @@ -117,7 +117,7 @@ pub struct Cli { fsck: bool, /// Force color on/off. Default: autodetect tty - #[arg(short, long, action = clap::ArgAction::Set, default_value_t=atty::is(Stream::Stdout))] + #[arg(short, long, action = clap::ArgAction::Set, default_value_t=stdout().is_terminal())] colorize: bool, /// Verbose mode |