From e683b871633b3f507d556e7e518c9e3286a4a452 Mon Sep 17 00:00:00 2001 From: Toni Kangas Date: Mon, 16 Oct 2023 16:29:34 +0300 Subject: [PATCH] fix(account): pass-through API response for JSON and YAML outputs (#257) --- internal/commands/account/show.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/commands/account/show.go b/internal/commands/account/show.go index e74c2a7e3..188804354 100644 --- a/internal/commands/account/show.go +++ b/internal/commands/account/show.go @@ -26,7 +26,8 @@ func (s *showCommand) ExecuteWithoutArguments(exec commands.Executor) (output.Ou if err != nil { return nil, err } - return output.Details{ + + details, err := output.Details{ Sections: []output.DetailSection{ { Rows: []output.DetailRow{ @@ -80,6 +81,11 @@ func (s *showCommand) ExecuteWithoutArguments(exec commands.Executor) (output.Ou }, }, }, nil + + return output.MarshaledWithHumanOutput{ + Value: account, + Output: details, + }, err } func formatCredits(credits float64) string {