diff --git a/cmd/query.go b/cmd/query.go index baf7fe5b..6d3ed90f 100644 --- a/cmd/query.go +++ b/cmd/query.go @@ -13,6 +13,7 @@ import ( "github.com/hyperledger-labs/yui-relayer/core" "github.com/hyperledger-labs/yui-relayer/helpers" "github.com/spf13/cobra" + "github.com/cosmos/gogoproto/jsonpb" ) // queryCmd represents the chain command @@ -66,7 +67,12 @@ func queryClientCmd(ctx *config.Context) *cobra.Command { if err := c.Codec().UnpackAny(res.ClientState, &cs); err != nil { return err } - fmt.Println(cs) + marshaler := jsonpb.Marshaler{} + if json, err := marshaler.MarshalToString(cs); err != nil { + fmt.Println(cs.String()) + } else { + fmt.Println(json) + } return nil }, } @@ -99,7 +105,12 @@ func queryConnection(ctx *config.Context) *cobra.Command { if err != nil { return err } - fmt.Println(res.Connection.String()) + marshaler := jsonpb.Marshaler{} + if json, err := marshaler.MarshalToString(res.Connection); err != nil { + fmt.Println(res.Connection.String()) + } else { + fmt.Println(json) + } return nil }, } @@ -132,7 +143,12 @@ func queryChannel(ctx *config.Context) *cobra.Command { if err != nil { return err } - fmt.Println(res.Channel.String()) + marshaler := jsonpb.Marshaler{} + if json, err := marshaler.MarshalToString(res.Channel); err != nil { + fmt.Println(res.Channel.String()) + } else { + fmt.Println(json) + } return nil }, } diff --git a/tests/docker.mk b/tests/docker.mk index b9087ff3..eebd7782 100644 --- a/tests/docker.mk +++ b/tests/docker.mk @@ -1,5 +1,5 @@ DOCKER ?= docker -DOCKER_COMPOSE ?= docker-compose +DOCKER_COMPOSE ?= docker compose DOCKER_REPO ?= "" DOCKER_TAG ?= latest DOCKER_BUILD ?= $(DOCKER) build --rm --no-cache --pull