From 539a5242711220dc328398881ea4a421259f1210 Mon Sep 17 00:00:00 2001 From: Phi Date: Sun, 20 Aug 2023 20:11:27 +0200 Subject: [PATCH] Make exec-trace human readable Make exec-trace human readable --- cmd/lotus-shed/msg.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/lotus-shed/msg.go b/cmd/lotus-shed/msg.go index 6562e156a..c9cab631e 100644 --- a/cmd/lotus-shed/msg.go +++ b/cmd/lotus-shed/msg.go @@ -64,7 +64,11 @@ var msgCmd = &cli.Command{ // Print the execution trace and receipt color.Green("Execution trace:") - fmt.Println(res.ExecutionTrace) + trace, err := json.MarshalIndent(res.ExecutionTrace, "", " ") + if err != nil { + return xerrors.Errorf("marshaling execution trace: %w", err) + } + fmt.Println(string(trace)) fmt.Println() color.Green("Receipt:") fmt.Printf("Exit code: %d\n", res.MsgRct.ExitCode)