Skip to content

Commit

Permalink
Fix 2 "bugs" found when setting up puku in a new repository (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
toastwaffle authored Aug 5, 2024
1 parent 99d1cd9 commit d1893d5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.0
1.11.1
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d1893d5

Please sign in to comment.