mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Add some error checking to prevent obscure failures.
This commit is contained in:
parent
e27d534b87
commit
e7b11d09de
@ -57,6 +57,7 @@ Examples:
|
||||
FilenameParam(flags.Filenames...).
|
||||
Flatten().
|
||||
Do()
|
||||
checkErr(r.Err())
|
||||
|
||||
count := 0
|
||||
err = r.Visit(func(info *resource.Info) error {
|
||||
|
@ -71,6 +71,7 @@ Examples:
|
||||
ResourceTypeOrNameArgs(args...).
|
||||
Flatten().
|
||||
Do()
|
||||
checkErr(r.Err())
|
||||
|
||||
found := 0
|
||||
err = r.IgnoreErrors(errors.IsNotFound).Visit(func(r *resource.Info) error {
|
||||
|
@ -86,6 +86,7 @@ func RunGet(f *Factory, out io.Writer, cmd *cobra.Command, args []string) {
|
||||
ResourceTypeOrNameArgs(args...).
|
||||
SingleResourceType().
|
||||
Do()
|
||||
checkErr(r.Err())
|
||||
|
||||
mapping, err := r.ResourceMapping()
|
||||
checkErr(err)
|
||||
|
@ -60,6 +60,7 @@ Examples:
|
||||
FilenameParam(flags.Filenames...).
|
||||
Flatten().
|
||||
Do()
|
||||
checkErr(r.Err())
|
||||
|
||||
patch := cmdutil.GetFlagString(cmd, "patch")
|
||||
if len(flags.Filenames) == 0 && len(patch) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user