Skip to content

Commit 1d65a42

Browse files
committed
fix not printing anything at all
1 parent eb57e7b commit 1d65a42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/root.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ func FormatCobraError(err error, cmd *cobra.Command) string {
437437
_, _ = fmt.Fprintln(&output, httpErr.Friendly())
438438
}
439439

440-
if cliflag.IsSetBool(cmd, varVerbose) {
440+
// If the httpErr is nil then we just have a regular error in which
441+
// case we want to print out what's happening.
442+
if httpErr == nil || cliflag.IsSetBool(cmd, varVerbose) {
441443
_, _ = fmt.Fprintln(&output, err.Error())
442444
}
443445

0 commit comments

Comments
 (0)