diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index 79a5376e..b290c32a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,14 +59,6 @@ fn main() -> std::io::Result<()> { let config = config::Config::from_arg_matches(cli::Opt::clap().get_matches(), &mut git_config); - if atty::is(atty::Stream::Stdin) { - return diff( - config.minus_file.as_ref(), - config.plus_file.as_ref(), - &config, - ); - } - if config.list_languages { list_languages()?; process::exit(0); @@ -79,6 +71,12 @@ fn main() -> std::io::Result<()> { } else if config.show_background_colors { show_background_colors(&config); process::exit(0); + } else if atty::is(atty::Stream::Stdin) { + return diff( + config.minus_file.as_ref(), + config.plus_file.as_ref(), + &config, + ); } let mut output_type = OutputType::from_mode(config.paging_mode, None, &config).unwrap(); |