From 79ef4c110e07d466381d36da608447b946e3020b Mon Sep 17 00:00:00 2001 From: Andrei Ivasko Date: Tue, 13 Apr 2021 10:32:08 -0700 Subject: [PATCH] Add env variable to cmd flags (#9040) * first draft * add tests in config_test package * refactored, all tests pass, r4r * ready for review * add envPrefix * Update simapp/simd/cmd/root.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> * fix linter issues * minor fixes Co-authored-by: Alessio Treglia Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- simd/cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simd/cmd/root.go b/simd/cmd/root.go index 30356d3ed53..ebb69b47c54 100644 --- a/simd/cmd/root.go +++ b/simd/cmd/root.go @@ -47,7 +47,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { WithAccountRetriever(types.AccountRetriever{}). WithBroadcastMode(flags.BroadcastBlock). WithHomeDir(simapp.DefaultNodeHome). - WithViper() + WithViper("") // In simapp, we don't use any prefix for env variables. rootCmd := &cobra.Command{ Use: "simd",