Skip to content

Commit ba1b0ee

Browse files
authored
fix(cli): change to use pre run for aliasing (#522)
It conflicts `PersistentPreRunE` of root cmd, so changed to use `PreRun` for run command. issue: none
1 parent 8d10c3e commit ba1b0ee

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

client/cmd/cmd.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func newRunCmd(name string, runFunc func(context.Context, app.Config) error) *co
3939
Use: name,
4040
Aliases: []string{"start"},
4141
Short: "Runs the story consensus client",
42-
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
42+
PreRunE: func(cmd *cobra.Command, _ []string) error {
4343
return aliasWithComet(cmd)
4444
},
4545
RunE: func(cmd *cobra.Command, _ []string) error {
@@ -70,10 +70,6 @@ func newRunCmd(name string, runFunc func(context.Context, app.Config) error) *co
7070
}
7171

7272
func aliasWithComet(cmd *cobra.Command) error {
73-
if cmd.Flags().Changed("with-comet") {
74-
return nil
75-
}
76-
7773
if cmd.Flags().Changed("with-tendermint") {
7874
val, err := cmd.Flags().GetBool("with-tendermint")
7975
if err != nil {

0 commit comments

Comments
 (0)