summaryrefslogtreecommitdiffstats
path: root/bin/core
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-11-01 11:48:34 +0100
committerMatthias Beyer <mail@beyermatthias.de>2018-11-01 20:36:34 +0100
commit089d5b98cb9be4dffc5e455834845d60c38b1c2f (patch)
tree53c1827902681021d0c6fb6a16f9e5f4f3346f05 /bin/core
parent993f83a31b11690e6e10e2283b290d4d04630b53 (diff)
Use error output from runtime to print error
Diffstat (limited to 'bin/core')
-rw-r--r--bin/core/imag-git/src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/core/imag-git/src/main.rs b/bin/core/imag-git/src/main.rs
index f17cf335..a5f370f9 100644
--- a/bin/core/imag-git/src/main.rs
+++ b/bin/core/imag-git/src/main.rs
@@ -136,7 +136,10 @@ fn main() {
Ok(exit_status) => {
if !exit_status.success() {
debug!("git exited with non-zero exit code: {:?}", exit_status);
- eprintln!("git exited with non-zero exit code");
+ let mut err = rt.stderr();
+ writeln!(err, "git exited with non-zero exit code")
+ .to_exit_code()
+ .unwrap_or_exit();
::std::process::exit(exit_status.code().unwrap_or(1));
}
debug!("Successful exit!");