mu: use locale_workaround for tables

The tabulate package triggers some locale exception, let's attempt to work
around it.
This commit is contained in:
Dirk-Jan C. Binnema 2022-05-17 22:32:37 +03:00
parent c4cc9795dc
commit a46dab2aad
2 changed files with 7 additions and 0 deletions

View File

@ -137,6 +137,10 @@ Mu::mu_cmd_fields(const MuConfig* opts)
{
g_return_val_if_fail(opts, Err(Error::Code::Internal, "no opts"));
if (!locale_workaround())
return Err(Error::Code::User, "failed to find a working locale");
std::cout << "#\n# message fields\n#\n";
show_fields(opts);
std::cout << "\n#\n# message flags\n#\n";

View File

@ -406,6 +406,9 @@ cmd_info(const Mu::Store& store, const MuConfig* opts)
{
using namespace tabulate;
if (!locale_workaround())
return Err(Error::Code::User, "failed to find a working locale");
auto colorify = [](Table& table) {
for (auto&& row: table) {