Skip to content

Commit

Permalink
Merge PR cosmos#3458: Fix usage of the config command in applications…
Browse files Browse the repository at this point in the history
… importing the SDK

* Fix usage of the config command in applications importing the SDK
* Update client/config.go
  • Loading branch information
jackzampolin authored and cwgoes committed Jan 31, 2019
1 parent 0e1f619 commit 5ea2be1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -32,15 +30,15 @@ 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",
RunE: runConfigCmd,
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")
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaia/cmd/gaiacli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5ea2be1

Please sign in to comment.