From 58b0cf27818b42205a63417de73b947bac358b7a Mon Sep 17 00:00:00 2001 From: K Date: Tue, 13 Aug 2024 18:01:22 +0330 Subject: [PATCH] fix(shell): stop showing usage on error (#1467) --- cmd/shell/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/shell/main.go b/cmd/shell/main.go index a3a46a896..e5461ea94 100644 --- a/cmd/shell/main.go +++ b/cmd/shell/main.go @@ -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, @@ -91,7 +92,7 @@ func main() { err := rootCmd.Execute() if err != nil { - cmd.PrintErrorMsgf("%s", err) + cmd.PrintErrorMsgf(err.Error()) } }