Skip to content

Commit

Permalink
Fix err check
Browse files Browse the repository at this point in the history
  • Loading branch information
msanterre committed Feb 27, 2024
1 parent cda59d3 commit 762331d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demo/charts/app-of-apps/templates/app-of-apps.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ spec:

syncPolicy:
automated: {}
{{ end }}
{{ end }}
12 changes: 8 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ func (w *Walker) Render(application *v1alpha1.Application, output string) error
var render Renderer

// Figure out which renderer to use
if application.Spec.Source.Helm != nil {
switch {
case application.Spec.Source.Helm != nil:
render = w.HelmTemplate
} else if application.Spec.Source.Kustomize != nil {
case application.Spec.Source.Kustomize != nil:
log.Println("WARNING: kustomize not supported")
return nil
} else {
default:
render = w.CopySource
}

Expand Down Expand Up @@ -219,7 +220,10 @@ func main() {
// Runs the command in the specified directory
if flag.NArg() == 1 {
rootPath := os.Args[len(os.Args)-1]
os.Chdir(rootPath)
err := os.Chdir(rootPath)
if err != nil {
log.Fatal(err)
}
}

start := time.Now()
Expand Down

0 comments on commit 762331d

Please sign in to comment.