mu: add --reindex option for mu index

I.e. without having to reinit explicitly.
This commit is contained in:
Dirk-Jan C. Binnema
2024-04-05 21:17:55 +03:00
parent 4ddbac5d5f
commit f813498f4d
7 changed files with 40 additions and 16 deletions

View File

@ -67,8 +67,12 @@ handle_result(const Result<void>& res, const Mu::Options& opts)
col.fg(Color::Blue), col.reset(),
col.fg(Color::Green), res.error().hint(), col.reset());
if (res.error().exit_code() != 0 && !res.error().is_soft_error())
mu_warning("mu finishing with error: {}", format_as(res.error()));
if (res.error().exit_code() != 0 && !res.error().is_soft_error()) {
mu_warning("mu finishing with error: {}",
format_as(res.error()));
if (const auto& hint = res.error().hint(); !hint.empty())
mu_info("hint: {}", hint);
}
return res.error().exit_code();
}