mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 20:21:56 +00:00
cli: WriteDemoConfig -> WriteConfigVals
This commit is contained in:
@@ -3,6 +3,7 @@ package cli
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@@ -129,8 +130,9 @@ func bindFlagsLoadViper(cmd *cobra.Command, args []string) error {
|
||||
|
||||
homeDir := viper.GetString(HomeFlag)
|
||||
viper.Set(HomeFlag, homeDir)
|
||||
viper.SetConfigName("config") // name of config file (without extension)
|
||||
viper.AddConfigPath(homeDir) // search root directory
|
||||
viper.SetConfigName("config") // name of config file (without extension)
|
||||
viper.AddConfigPath(homeDir) // search root directory
|
||||
viper.AddConfigPath(filepath.Join(homeDir, "config")) // search root directory /config
|
||||
|
||||
// If a config file is found, read it in.
|
||||
if err := viper.ReadInConfig(); err == nil {
|
||||
|
Reference in New Issue
Block a user