Skip to content

Commit

Permalink
Merge 5e353ef into 05f612b
Browse files Browse the repository at this point in the history
  • Loading branch information
basile-henry committed Apr 11, 2021
2 parents 05f612b + 5e353ef commit 356ee8b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
use crate::config::FmtConfig;
use crate::{expand_if_path, expand_path};
use anyhow::{anyhow, Result};
use console::style;
use globset::{GlobBuilder, GlobSet, GlobSetBuilder};
use log::debug;
use path_clean::PathClean;
Expand Down Expand Up @@ -96,6 +97,14 @@ impl Formatter {
match cmd_arg.output() {
Ok(out) => {
if !out.status.success() {
debug!(
"Error using formatter {}:\n{stdout}:\n{}\n{stderr}:\n{}",
self.name,
String::from_utf8_lossy(&out.stdout),
String::from_utf8_lossy(&out.stderr),
stdout = style("• [STDOUT]").bold().dim(),
stderr = style("• [STDERR]").bold().dim(),
);
match out.status.code() {
Some(scode) => {
return Err(anyhow!(
Expand Down

0 comments on commit 356ee8b

Please sign in to comment.