We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 877c760 commit 10d2fcaCopy full SHA for 10d2fca
src/main.rs
@@ -1,6 +1,7 @@
1
use clap::value_parser;
2
use clap::{Arg, ArgAction, Command};
3
use owo_colors::OwoColorize;
4
+use std::io::IsTerminal;
5
use std::path::Path;
6
use tracing::debug;
7
use tracing_subscriber;
@@ -180,7 +181,13 @@ fn main() {
180
181
}
182
};
183
- let result = formatting::render(&Terminal, &technique, wrap_width);
184
+ let result;
185
+ if raw_output || std::io::stdout().is_terminal() {
186
+ result = formatting::render(&Terminal, &technique, wrap_width);
187
+ } else {
188
+ result = formatting::render(&Identity, &technique, wrap_width);
189
+ }
190
+
191
print!("{}", result);
192
193
Some(("render", submatches)) => {
0 commit comments