Skip to content

Commit

Permalink
fix(shell): stop showing usage on error (#1467)
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy authored Aug 13, 2024
1 parent 9991001 commit 58b0cf2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/shell/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ func main() {
)

rootCmd := &cobra.Command{
Use: "shell",
Short: "Pactus Shell",
Long: `pactus-shell is a command line tool for interacting with the Pactus blockchain using gRPC`,
Use: "shell",
Short: "Pactus Shell",
SilenceUsage: true,
Long: `pactus-shell is a command line tool for interacting with the Pactus blockchain using gRPC`,
}

sh := shell.New(rootCmd, nil,
Expand Down Expand Up @@ -91,7 +92,7 @@ func main() {

err := rootCmd.Execute()
if err != nil {
cmd.PrintErrorMsgf("%s", err)
cmd.PrintErrorMsgf(err.Error())
}
}

Expand Down

0 comments on commit 58b0cf2

Please sign in to comment.