New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not wrap lines if we can't read term size #109722
Conversation
Please note that we're already in Test Freeze for the |
/milestone v1.24 |
/triage accepted |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brianpursley, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-kubernetes-e2e-kind |
…722-upstream-release-1.24 Automated cherry pick of #109722: Do not wrap lines if we can't read term size
What type of PR is this?
/kind bug
/kind regression
/sig cli
What this PR does / why we need it:
In #104736 we introduced pretty printed help messages for kubectl.
Unfortunately, in some scripts it's possible that this will return the following error:
I've noticed that while changing introducing this change into OpenShift (openshift/oc#1121, specifically failures from https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_oc/1121/pull-ci-openshift-oc-master-e2e-agnostic-cmd/1519729283440840704). This PR make it so that when we can't read the term size, we just set the limit to 0 which make the wrapping not to happen at all, which is consistent with previous mechanism.
Special notes for your reviewer:
/assign @ardaguclu @eddiezane
/cc @lauchokyip
Does this PR introduce a user-facing change?