Merge PR #3458: Fix usage of the config command in applications importing the SDK
* Fix usage of the config command in applications importing the SDK * Update client/config.go
This commit is contained in:
parent
0e1f61949e
commit
5ea2be1adc
@ -9,8 +9,6 @@ import (
|
||||
|
||||
"github.com/tendermint/tendermint/libs/cli"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/cmd/gaia/app"
|
||||
|
||||
"github.com/pelletier/go-toml"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
@ -32,7 +30,7 @@ func init() {
|
||||
|
||||
// ConfigCmd returns a CLI command to interactively create a
|
||||
// Gaia CLI config file.
|
||||
func ConfigCmd() *cobra.Command {
|
||||
func ConfigCmd(defaultCLIHome string) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "config <key> [value]",
|
||||
Short: "Create or query a Gaia CLI configuration file",
|
||||
@ -40,7 +38,7 @@ func ConfigCmd() *cobra.Command {
|
||||
Args: cobra.RangeArgs(0, 2),
|
||||
}
|
||||
|
||||
cmd.Flags().String(cli.HomeFlag, app.DefaultCLIHome,
|
||||
cmd.Flags().String(cli.HomeFlag, defaultCLIHome,
|
||||
"set client's home directory for configuration")
|
||||
cmd.Flags().Bool(flagGet, false,
|
||||
"print configuration value or its default if unset")
|
||||
|
||||
@ -84,7 +84,7 @@ func main() {
|
||||
// Construct Root Command
|
||||
rootCmd.AddCommand(
|
||||
rpc.StatusCommand(),
|
||||
client.ConfigCmd(),
|
||||
client.ConfigCmd(app.DefaultCLIHome),
|
||||
queryCmd(cdc, mc),
|
||||
txCmd(cdc, mc),
|
||||
client.LineBreak,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user