Skip to content

Commit

Permalink
Add --force-enable-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh1Yo committed Jul 28, 2023
1 parent d287dcd commit 4ca5464
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/config/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ It's possible to overwrite this behavior by specifying the option")
Arg::with_name("disable-colors")
.long("disable-colors")
)
.arg(
Arg::with_name("force-enable-colors")
.long("force-enable-colors")
)
.arg(
Arg::with_name("disable-trustdns")
.long("disable-trustdns")
Expand Down Expand Up @@ -553,6 +557,11 @@ Increase the amount of workers to remove the error or use --force.")?;
colored::control::set_override(false);
}

// force enable colors to preseve colors while redirecting output
if args.is_present("force-enable-colors") {
colored::control::set_override(true);
}

// decrease verbose by 1 in case > 1 url is being checked in parallel
// this behavior is explained in docs
let verbose = if verbose > 0 && !(workers == 1 || urls.len() == 1) {
Expand Down

0 comments on commit 4ca5464

Please sign in to comment.