diff --git a/main.go b/main.go index 27eebf71..44caf8d3 100644 --- a/main.go +++ b/main.go @@ -386,7 +386,8 @@ func main() { err := app.Run(os.Args) if err != nil { - log.Panicf("[bug] this code path shouldn't be arrived: helmfile is expected to exit from within the `cleanup` func in main.go: %v", err) + logger.Errorf("%v", err) + os.Exit(3) } } diff --git a/state/state.go b/state/state.go index 79a24994..e14dd637 100644 --- a/state/state.go +++ b/state/state.go @@ -703,9 +703,11 @@ func (state *HelmState) namespaceAndValuesFlags(helm helmexec.Interface, basePat if _, err := os.Stat(path); os.IsNotExist(err) { return nil, err } + yamlBuf, err := RenderTemplateFileToBuffer(path) if err != nil { - return nil, err + + return nil, fmt.Errorf("failed to render [%s], because of %v", path, err) } valfile, err := ioutil.TempFile("", "values") if err != nil {