diff --git a/ChangeLog b/ChangeLog index 0216aa5..1591dea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Version 1.11.1 +------------- + * Fix a bug causing a panic when the third party directory is misconfigured + * Add the filename to the error message seen if a puku.json file is malformed + Version 1.11.0 ------------- * Make puku rewrite build files by default, with a flag to skip rewriting diff --git a/VERSION b/VERSION index 1cac385..720c738 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.0 +1.11.1 diff --git a/config/config.go b/config/config.go index 2609db6..08c6d69 100644 --- a/config/config.go +++ b/config/config.go @@ -2,6 +2,7 @@ package config import ( "encoding/json" + "fmt" "os" "path/filepath" "strings" @@ -102,7 +103,7 @@ func readOneConfig(path string) (*Config, error) { c := new(Config) if err := json.Unmarshal(f, c); err != nil { - return nil, err + return nil, fmt.Errorf("in %s: %w", path, err) } configs[path] = c diff --git a/generate/generate.go b/generate/generate.go index ae3d1ed..cf6ea12 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -88,7 +88,11 @@ func UpdateToStdout(format string, plzConf *please.Config, opts options.Options, } func (u *updater) readAllModules(conf *config.Config) error { - return filepath.WalkDir(conf.GetThirdPartyDir(), func(path string, info fs.DirEntry, _ error) error { + return filepath.WalkDir(conf.GetThirdPartyDir(), func(path string, info fs.DirEntry, err error) error { + if err != nil { + return err + } + for _, buildFileName := range u.plzConf.BuildFileNames() { if info.Name() == buildFileName { file, err := u.graph.LoadFile(filepath.Dir(path))