Skip to content

Commit

Permalink
rpk: fix printing new lines
Browse files Browse the repository at this point in the history
If the message was empty, we would print new lines
to stderr

(cherry picked from commit a82fd06)
  • Loading branch information
r-vasquez authored and vbotbuildovich committed Nov 1, 2024
1 parent 48822d6 commit 41a406e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/adminapi/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ func licenseFeatureChecks(ctx context.Context, fs afero.Fs, cl *AdminAPI, p *con
}
}
}
if ws, err := mTerm.GetWinsize(0); err == nil {
if ws, err := mTerm.GetWinsize(0); err == nil && msg != "" {
// text.Wrap removes the newline from the text. We add it back.
msg = "\n" + text.Wrap(msg, int(ws.Width)) + "\n"
}
Expand Down

0 comments on commit 41a406e

Please sign in to comment.