mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Did not print 'No resources found.' if error.
This commit is contained in:
parent
c19569f03f
commit
930cd155ad
@ -323,7 +323,7 @@ func RunGet(f cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args [
|
||||
}
|
||||
errs = append(errs, err)
|
||||
}
|
||||
if len(infos) == 0 {
|
||||
if len(infos) == 0 && len(errs) == 0 {
|
||||
outputEmptyListWarning(errOut)
|
||||
}
|
||||
|
||||
@ -375,7 +375,7 @@ func RunGet(f cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args [
|
||||
if err != nil {
|
||||
allErrs = append(allErrs, err)
|
||||
}
|
||||
if len(infos) == 0 {
|
||||
if len(infos) == 0 && len(allErrs) == 0 {
|
||||
outputEmptyListWarning(errOut)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user