Skip to content

Commit

Permalink
bridge: Add version command
Browse files Browse the repository at this point in the history
  • Loading branch information
ngotchac committed Mar 1, 2022
1 parent 96b70b7 commit 5ca1c1b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bridge/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/spf13/viper"

"github.com/maticnetwork/heimdall/helper"
"github.com/maticnetwork/heimdall/version"
)

const (
Expand All @@ -21,8 +22,10 @@ var rootCmd = &cobra.Command{
Use: "heimdall-bridge",
Short: "Heimdall bridge deamon",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
// initialize tendermint viper config
InitTendermintViperConfig(cmd)
if cmd.Use != version.Cmd.Use {
// initialize tendermint viper config
InitTendermintViperConfig(cmd)
}
},
}

Expand Down Expand Up @@ -61,6 +64,7 @@ func Execute() {

func init() {
var logger = helper.Logger.With("module", "bridge/cmd/")
rootCmd.AddCommand(version.Cmd)
rootCmd.PersistentFlags().StringP(helper.NodeFlag, "n", "tcp://localhost:26657", "Node to connect to")
rootCmd.PersistentFlags().String(helper.HomeFlag, os.ExpandEnv("$HOME/.heimdalld"), "directory for config and data")
rootCmd.PersistentFlags().String(
Expand Down

0 comments on commit 5ca1c1b

Please sign in to comment.