mirror of https://github.com/k3s-io/k3s
Merge pull request #4281 from brendandburns/fixer
Add some error checking to prevent obscure failures.pull/6/head
commit
ef71b43056
|
@ -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