diff --git a/bin/core/imag-ids/Cargo.toml b/bin/core/imag-ids/Cargo.toml index da335333..84222b38 100644 --- a/bin/core/imag-ids/Cargo.toml +++ b/bin/core/imag-ids/Cargo.toml @@ -26,8 +26,9 @@ filters = "0.3" nom = "3.2" log = "0.4" toml = "0.4" -toml-query = "0.7" +toml-query = { git = "https://github.com/matthiasbeyer/toml-query", branch = "failure" } is-match = "0.1" +failure = "0.1" libimagstore = { version = "0.9.0", path = "../../../lib/core/libimagstore" } libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" } diff --git a/bin/core/imag-ids/src/id_filters.rs b/bin/core/imag-ids/src/id_filters.rs index 537e23a0..e595b346 100644 --- a/bin/core/imag-ids/src/id_filters.rs +++ b/bin/core/imag-ids/src/id_filters.rs @@ -51,6 +51,7 @@ pub mod header_filter_lang { use nom::digit; use nom::multispace; + use failure::Error; use libimagstore::store::Entry; use libimagerror::trace::MapErrTrace; @@ -403,6 +404,7 @@ pub mod header_filter_lang { entry .get_header() .read(selector_str) + .map_err(Error::from) .map_err_trace_exit_unwrap(1) .map(|value| { let comp = Comparator(&self.compare_operator, &self.compare_value); diff --git a/bin/core/imag-ids/src/main.rs b/bin/core/imag-ids/src/main.rs index f69fd891..63998ce2 100644 --- a/bin/core/imag-ids/src/main.rs +++ b/bin/core/imag-ids/src/main.rs @@ -39,6 +39,7 @@ extern crate filters; #[macro_use] extern crate is_match; extern crate toml; extern crate toml_query; +extern crate failure; #[cfg(test)] extern crate env_logger; @@ -68,7 +69,7 @@ fn main() { let version = make_imag_version!(); let rt = generate_runtime_setup("imag-ids", &version, - "Print all ids, optionally filtered with a user-defined filter", + "print all ids", build_ui); let print_storepath = rt.cli().is_present("print-storepath");