From 39f8d20cfaa1f82725a50934a1b7f3e32352d5dc Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Tue, 3 Sep 2024 15:41:05 +0300 Subject: [PATCH] Print resolved container id in list-container Signed-off-by: Denis Kirillov --- modules/chains/list_container.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/chains/list_container.go b/modules/chains/list_container.go index 5d44c36..7f74ff5 100644 --- a/modules/chains/list_container.go +++ b/modules/chains/list_container.go @@ -44,6 +44,9 @@ func runListContainerCmd(cmd *cobra.Command, _ []string) error { ns := viper.GetString(namespaceFlag) cnrID, err := resolver.ResolveContainerID(endpoint, ns, viper.GetString(containerFlag)) + if err != nil { + return err + } policyHash, err := resolver.ResolveContractHash(endpoint, viper.GetString(policyHashFlag)) if err != nil { @@ -62,6 +65,7 @@ func runListContainerCmd(cmd *cobra.Command, _ []string) error { decodeID := viper.GetBool(decodeIDFlag) + cmd.Println("cid:", cnrID) cmd.Printf("namespace '%s' policies: %d\n", ns, len(res)) if err = printChains(cmd, res, decodeID); err != nil { return err