mirror of https://github.com/djcb/mu.git
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:
parent
c4cc9795dc
commit
a46dab2aad
|
@ -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";
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue