summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 59e7e51..315d093 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,8 +17,12 @@ struct Args {
/// emit the feed as json
#[arg(long)]
json: bool,
+ /// ignore things that look wrong as long as possible
#[arg(long="ignore-nonfatal", short='i')]
- ignore_nonfatal: bool
+ ignore_nonfatal: bool,
+ /// don't do terminal colours
+ #[arg(long="no-colors")]
+ no_colors: bool
}
@@ -52,7 +56,9 @@ async fn main() -> miette::Result<()> {
match args.json {
true =>
println!("{}", protobuf_json_mapping::print_to_string(&proto).into_diagnostic()?),
- false =>
+ false if args.no_colors =>
+ println!("{}", protobuf::text_format::print_to_string_pretty(&proto)),
+ false =>
println!("{}", fancy::print_to_string_fancy(&proto))
}