From 7db23870e27f006efaf2ad8b771af82ff09dc2c6 Mon Sep 17 00:00:00 2001 From: OmniWired Date: Fri, 12 Jan 2024 21:08:51 +0900 Subject: [PATCH] feat: load ENV to make it work with cosmos omnibus (#73) * chore: Update .gitignore file (sdk_upgrade) Updated .gitignore file to include *.txt and .idea directories. * feat(cmd): update teritorid root command - Add AutomaticEnv() to initClientCtx.Viper (issue sdk_upgrade) --- .gitignore | 3 ++- cmd/teritorid/cmd/root.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e69702c..bdb697f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ *.zip testnetv2 data -*.txt \ No newline at end of file +*.txt +.idea \ No newline at end of file diff --git a/cmd/teritorid/cmd/root.go b/cmd/teritorid/cmd/root.go index f3cb55e..c5cc7df 100644 --- a/cmd/teritorid/cmd/root.go +++ b/cmd/teritorid/cmd/root.go @@ -47,10 +47,11 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { WithAccountRetriever(types.AccountRetriever{}). WithHomeDir(teritori.DefaultNodeHome). WithViper("") + initClientCtx.Viper.AutomaticEnv() rootCmd := &cobra.Command{ Use: "teritorid", - Short: "Stargate Cosmos Hub App", + Short: "Teritori Network", PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { initClientCtx, err := client.ReadPersistentCommandFlags(initClientCtx, cmd.Flags()) if err != nil {