Skip to content

Commit

Permalink
Handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
msanterre committed Feb 27, 2024
1 parent 030e989 commit a160f62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ func (w *Walker) walk(inputPath, outputPath string, depth, maxDepth int, visited
if hashGenerated != hash || emptyManifest {
log.Printf("No match detected. Render: %s\n", crd.ObjectMeta.Name)
if err := w.Render(crd, path); err != nil {
if strings.Contains(err.Error(), "not supported") {
continue
}
return err
}

Expand Down Expand Up @@ -163,7 +166,7 @@ func (w *Walker) Render(application *v1alpha1.Application, output string) error
render = w.HelmTemplate
case application.Spec.Source.Kustomize != nil:
log.Println("WARNING: kustomize not supported")
return nil
return fmt.Errorf("kustomize not supported")
default:
render = w.CopySource
}
Expand Down

0 comments on commit a160f62

Please sign in to comment.