From 68a9dc3e30a95212abd9946af29c16a61421f6b3 Mon Sep 17 00:00:00 2001 From: dgarcia18 <161306363+dgarcia18@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:41:21 +0100 Subject: [PATCH] B OpenNebula/one#6509: CLI not reporting error (#2970) for json and yaml options Signed-off-by: Daniel --- src/cli/one_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/one_helper.rb b/src/cli/one_helper.rb index 8d9cd25f26..c04b43e024 100644 --- a/src/cli/one_helper.rb +++ b/src/cli/one_helper.rb @@ -918,12 +918,12 @@ EOT elsif options[:xml] return list_pool_xml(pool, options, filter_flag) elsif options[:json] - list_pool_format(pool, options, filter_flag) do |pool| + return list_pool_format(pool, options, filter_flag) do |pool| hash = check_resource_xsd(pool, pname) puts ::JSON.pretty_generate(hash) end elsif options[:yaml] - list_pool_format(pool, options, filter_flag) do |pool| + return list_pool_format(pool, options, filter_flag) do |pool| hash = check_resource_xsd(pool, pname) puts hash.to_yaml(:indent => 4) end