Skip to content

Commit

Permalink
Add env variable to cmd flags (cosmos#9040)
Browse files Browse the repository at this point in the history
* 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 <alessio@tendermint.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Apr 13, 2021
1 parent fbb4108 commit 79ef4c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 79ef4c1

Please sign in to comment.