mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-04 20:28:14 +00:00
should check and return err when visit failure
This commit is contained in:
@@ -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).
|
||||||
|
|||||||
Reference in New Issue
Block a user