kyaml: fix error handling

This commit is contained in:
Phillip Wittrock
2019-12-09 16:35:19 -08:00
parent 50c9916eae
commit b333115314
3 changed files with 3 additions and 8 deletions

View File

@@ -135,9 +135,5 @@ func (r *WrapRunner) runE(c *cobra.Command, args []string) error {
Writer: c.OutOrStdout(), Writer: c.OutOrStdout(),
WrappingKind: kio.ResourceListKind, WrappingKind: kio.ResourceListKind,
WrappingAPIVersion: kio.ResourceListAPIVersion}}}.Execute() WrappingAPIVersion: kio.ResourceListAPIVersion}}}.Execute()
if err != nil { return handleError(c, err)
return err
}
return nil
} }

View File

@@ -211,7 +211,7 @@ func (r *XArgsRunner) runE(c *cobra.Command, _ []string) error {
return err return err
} }
return run.Run() return handleError(c, run.Run())
} }
func parseYNode(node *yaml.Node) string { func parseYNode(node *yaml.Node) string {

View File

@@ -52,6 +52,5 @@ func (r *RunFnRunner) runE(c *cobra.Command, args []string) error {
if r.DryRun { if r.DryRun {
rec.Output = c.OutOrStdout() rec.Output = c.OutOrStdout()
} }
return rec.Execute() return handleError(c, rec.Execute())
} }