notmuch: log any stderr output
This commit is contained in:
parent
e365ced7dd
commit
b58556254e
@ -214,9 +214,8 @@ use std::{
|
|||||||
process::Command,
|
process::Command,
|
||||||
};
|
};
|
||||||
|
|
||||||
use log::{error, info};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tracing::instrument;
|
use tracing::{error, info, instrument, warn};
|
||||||
|
|
||||||
/// # Number of seconds since the Epoch
|
/// # Number of seconds since the Epoch
|
||||||
pub type UnixTime = isize;
|
pub type UnixTime = isize;
|
||||||
@ -718,6 +717,13 @@ impl Notmuch {
|
|||||||
cmd.args(args);
|
cmd.args(args);
|
||||||
info!("{:?}", &cmd);
|
info!("{:?}", &cmd);
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
|
if !out.stderr.is_empty() {
|
||||||
|
warn!(
|
||||||
|
"{:?}: STDERR:\n{}",
|
||||||
|
&cmd,
|
||||||
|
String::from_utf8_lossy(&out.stderr)
|
||||||
|
);
|
||||||
|
}
|
||||||
Ok(out.stdout)
|
Ok(out.stdout)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user