Skip to content

Commit

Permalink
context: Set quiet mode on json output
Browse files Browse the repository at this point in the history
So that only the json is printed and it is parsable.
  • Loading branch information
jan-kolarik authored and kontura committed Jun 6, 2024
1 parent 7e57a92 commit 5b37b8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dnf5/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ class Context::Impl {
void set_should_store_offline(bool should_store_offline) { this->should_store_offline = should_store_offline; }
bool get_should_store_offline() const { return should_store_offline; }

void set_json_output_requested(bool json_output) { this->json_output = json_output; }
void set_json_output_requested(bool json_output) {
this->json_output = json_output;
if (json_output) {
set_quiet(true);
}
}
bool get_json_output_requested() const { return json_output; }

libdnf5::Base & get_base() { return base; };
Expand Down

0 comments on commit 5b37b8c

Please sign in to comment.