From c616a5cfafe9c4963b7399f75d3abb3ae152f57d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 2 Nov 2018 10:57:42 +0100 Subject: [PATCH] Add ID reporting in imag-ref --- bin/core/imag-ref/src/main.rs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/bin/core/imag-ref/src/main.rs b/bin/core/imag-ref/src/main.rs index d273ec90..c0f22f95 100644 --- a/bin/core/imag-ref/src/main.rs +++ b/bin/core/imag-ref/src/main.rs @@ -88,16 +88,20 @@ fn deref(rt: &Runtime) { .map_err_trace_exit_unwrap(1); match rt.store().get(id.clone()).map_err_trace_exit_unwrap(1) { - Some(entry) => entry - .get_path() - .map_err_trace_exit_unwrap(1) - .to_str() - .ok_or_else(|| { - error!("Could not transform path into string!"); - exit(1) - }) - .map(|s| info!("{}", s)) - .ok(), // safe here because we exited already in the error case + Some(entry) => { + entry + .get_path() + .map_err_trace_exit_unwrap(1) + .to_str() + .ok_or_else(|| { + error!("Could not transform path into string!"); + exit(1) + }) + .map(|s| info!("{}", s)) + .ok(); // safe here because we exited already in the error case + + let _ = rt.report_touched(&id).map_err_trace_exit_unwrap(1); + }, None => { error!("No entry for id '{}' found", id); exit(1)