Fixed repoquery output of mamba when query format is JSON (#2353)

Fixed repoquery output of mamba when query format is JSON
This commit is contained in:
Johan Mabille 2023-03-07 14:55:09 +01:00 committed by GitHub
parent 287e87a0e1
commit 0919fbd514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -372,7 +372,7 @@ PYBIND11_MODULE(bindings, m)
case query::PRETTY:
res.groupby("name").pretty(res_stream);
}
if (res.empty())
if (res.empty() && format != query::JSON)
{
res_stream << query
<< " may not be installed. Try specifying a channel with '-c,--channel' option\n";
@ -403,7 +403,7 @@ PYBIND11_MODULE(bindings, m)
{ "Name", "Version", "Build", concat("Depends:", query), "Channel" }
);
}
if (res.empty())
if (res.empty() && format != query::JSON)
{
res_stream << query
<< " may not be installed. Try giving a channel with '-c,--channel' option for remote repoquery\n";
@ -435,7 +435,7 @@ PYBIND11_MODULE(bindings, m)
// query), "Channel"});
res.table(res_stream);
}
if (res.empty())
if (res.empty() && format != query::JSON)
{
res_stream << query
<< " may not be installed. Try giving a channel with '-c,--channel' option for remote repoquery\n";