mirror of https://github.com/k3s-io/k3s
should check and return err when visit failure
parent
40212c17cd
commit
7a05ecd046
|
@ -233,7 +233,7 @@ func forceReplace(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []s
|
||||||
if timeout == 0 {
|
if timeout == 0 {
|
||||||
timeout = kubectl.Timeout
|
timeout = kubectl.Timeout
|
||||||
}
|
}
|
||||||
r.Visit(func(info *resource.Info, err error) error {
|
err = r.Visit(func(info *resource.Info, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -245,6 +245,9 @@ func forceReplace(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []s
|
||||||
return true, nil
|
return true, nil
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
r = f.NewBuilder().
|
r = f.NewBuilder().
|
||||||
Unstructured(f.UnstructuredClientForMapping, mapper, typer).
|
Unstructured(f.UnstructuredClientForMapping, mapper, typer).
|
||||||
|
|
Loading…
Reference in New Issue