Skip to content

Commit

Permalink
Update aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Olshansk committed Jul 13, 2023
1 parent 5afa891 commit 97ef3da
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 5 additions & 4 deletions app/client/cli/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func newDebugUISubCommands() []*cobra.Command {
// newDebugUICommand returns the cobra CLI for the Debug UI interface.
func newDebugUICommand() *cobra.Command {
return &cobra.Command{
Aliases: []string{"dui", "d"},
Use: "debugui",
Aliases: []string{"dui"},
Use: "DebugUI",
Short: "Debug selection ui for rapid development",
Args: cobra.MaximumNArgs(0),
PersistentPreRunE: helpers.P2PDependenciesPreRunE,
Expand All @@ -84,7 +84,8 @@ func newDebugUICommand() *cobra.Command {
// newDebugCommand returns the cobra CLI for the Debug command.
func newDebugCommand() *cobra.Command {
return &cobra.Command{
Use: "debug",
Use: "Debug",
Aliases: []string{"d"},
Short: "Debug utility for rapid development",
Args: cobra.MaximumNArgs(1),
PersistentPreRunE: helpers.P2PDependenciesPreRunE,
Expand All @@ -95,9 +96,9 @@ func debugCommands() []*cobra.Command {
cmds := []*cobra.Command{
{
Use: "TriggerView",
Aliases: []string{"next", "trigger", "view"},
Short: "Trigger the next view in consensus",
Long: "Sends a message to all visible nodes on the network to start the next view (height/step/round) in consensus",
Aliases: []string{"triggerView"},
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
m := &messaging.DebugMessage{
Expand Down
3 changes: 3 additions & 0 deletions app/client/cli/docgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
"github.com/spf13/cobra/doc"
)

// TODO: Document that `Aliases` should be either dromedaryCase, one word lowercase, or just a few lowercase letters.
// TODO: Document that `Use` should also be PascalCase

func main() {
workingDir, err := os.Getwd()
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions app/client/cli/helpers/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ func P2PDependenciesPreRunE(cmd *cobra.Command, _ []string) error {
// TECHDEBT: this is to keep backwards compatibility with localnet
flags.ConfigPath = runtime.GetEnv("CONFIG_PATH", "build/config/config.validator1.json")

// by this time, the config path should be set
configs.ParseConfig(flags.ConfigPath)
// By this time, the config path should be set.
// This is only being called for viper related side effects
_ = configs.ParseConfig(flags.ConfigPath)
// set final `remote_cli_url` value; order of precedence: flag > env var > config > default
flags.RemoteCLIURL = viper.GetString("remote_cli_url")

Expand Down

0 comments on commit 97ef3da

Please sign in to comment.