mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Merge pull request #39038 from ncdc/fix-kubectl-get-list
Automatic merge from submit-queue Fix kubectl get -f <file> -o <nondefault printer> so it prints all items in the file **What this PR does / why we need it**: Fix kubectl get -f <file> -o <nondefault printer> so it prints all the objects in the file, instead of just the first one. Also add a test for this feature. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #38907 **Special notes for your reviewer**: **Release note**: ```release-note ``` cc @AdoHe @deads2k @liggitt @fabianofranz @kubernetes/kubectl @kubernetes/sig-cli-misc
This commit is contained in:
@@ -187,7 +187,7 @@ func (o *LabelOptions) RunLabel(f cmdutil.Factory, cmd *cobra.Command) error {
|
||||
Latest()
|
||||
}
|
||||
one := false
|
||||
r := b.Do().IntoSingular(&one)
|
||||
r := b.Do().IntoSingleItemImplied(&one)
|
||||
if err := r.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user