summaryrefslogtreecommitdiffstats
path: root/bin/core
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-11-02 10:57:42 +0100
committerMatthias Beyer <mail@beyermatthias.de>2018-11-06 20:35:18 +0100
commitc616a5cfafe9c4963b7399f75d3abb3ae152f57d (patch)
treeb3c3eef8831f022b3d18e4bcb04425ed0c70f5af /bin/core
parent502cdf57216efbb514e837c6f6f3fc318084ed05 (diff)
Add ID reporting in imag-ref
Diffstat (limited to 'bin/core')
-rw-r--r--bin/core/imag-ref/src/main.rs24
1 files 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)