Merge pull request #1921 from pwittrock/fixes

kyaml: fix error handling
This commit is contained in:
Kubernetes Prow Robot
2019-12-09 17:07:30 -08:00
committed by GitHub
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(),
WrappingKind: kio.ResourceListKind,
WrappingAPIVersion: kio.ResourceListAPIVersion}}}.Execute()
if err != nil {
return err
}
return nil
return handleError(c, err)
}

View File

@@ -211,7 +211,7 @@ func (r *XArgsRunner) runE(c *cobra.Command, _ []string) error {
return err
}
return run.Run()
return handleError(c, run.Run())
}
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 {
rec.Output = c.OutOrStdout()
}
return rec.Execute()
return handleError(c, rec.Execute())
}