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