diff --git a/src/error.rs b/src/error.rs index fab0a89..74b2798 100644 --- a/src/error.rs +++ b/src/error.rs @@ -47,11 +47,10 @@ where T: std::str::FromStr, { let str = shellexpand::env(str).map_err(|e| error2(e, 0..0))?; - str.parse::().map_err(|e| { + str.parse::().inspect_err(|e| { let writer = StandardStream::stderr(term::termcolor::ColorChoice::Auto); let config = term::Config::default(); let file = SimpleFile::new(name, str); - term::emit(&mut writer.lock(), &config, &file, &report(&e)).unwrap(); - e + term::emit(&mut writer.lock(), &config, &file, &report(e)).unwrap(); }) }