summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Worthe <justin@jemstep.com>2020-02-19 10:24:01 +0200
committerJustin Worthe <justin@jemstep.com>2020-02-19 10:24:01 +0200
commit3d2a57cf2d2139fa1606d1f595b13f234eb745a5 (patch)
treed6747741587ada97921f3424f4ef857b7c81e6da
parent87fcc7a3dd767481538ad1182f73a1716ad10bf0 (diff)
Improved logging of GPG errors
-rw-r--r--src/gpg.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gpg.rs b/src/gpg.rs
index a35d6ba..78a0648 100644
--- a/src/gpg.rs
+++ b/src/gpg.rs
@@ -57,16 +57,15 @@ impl Gpg for LiveGpg {
.args(&["--keyserver", &self.keyserver])
.arg("--recv-keys")
.args(fingerprints)
- .stdout(Stdio::null())
- .stderr(Stdio::null())
- .status()?;
+ .output()?;
- if result.success() {
+ if result.status.success() {
Ok(())
} else {
+ debug!("GPG Stderr: {:?}", String::from_utf8(result.stderr));
Err(Box::new(CapnError::new(format!(
"Call to GPG keyserver failed with code {:?}",
- result.code()
+ result.status.code()
))))
}
};