Skip to content

Commit d1893d5

Browse files
authored
Fix 2 "bugs" found when setting up puku in a new repository (#123)
1 parent 99d1cd9 commit d1893d5

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

Diff for: ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 1.11.1
2+
-------------
3+
* Fix a bug causing a panic when the third party directory is misconfigured
4+
* Add the filename to the error message seen if a puku.json file is malformed
5+
16
Version 1.11.0
27
-------------
38
* Make puku rewrite build files by default, with a flag to skip rewriting

Diff for: VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.0
1+
1.11.1

Diff for: config/config.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package config
22

33
import (
44
"encoding/json"
5+
"fmt"
56
"os"
67
"path/filepath"
78
"strings"
@@ -102,7 +103,7 @@ func readOneConfig(path string) (*Config, error) {
102103

103104
c := new(Config)
104105
if err := json.Unmarshal(f, c); err != nil {
105-
return nil, err
106+
return nil, fmt.Errorf("in %s: %w", path, err)
106107
}
107108

108109
configs[path] = c

Diff for: generate/generate.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ func UpdateToStdout(format string, plzConf *please.Config, opts options.Options,
8888
}
8989

9090
func (u *updater) readAllModules(conf *config.Config) error {
91-
return filepath.WalkDir(conf.GetThirdPartyDir(), func(path string, info fs.DirEntry, _ error) error {
91+
return filepath.WalkDir(conf.GetThirdPartyDir(), func(path string, info fs.DirEntry, err error) error {
92+
if err != nil {
93+
return err
94+
}
95+
9296
for _, buildFileName := range u.plzConf.BuildFileNames() {
9397
if info.Name() == buildFileName {
9498
file, err := u.graph.LoadFile(filepath.Dir(path))

0 commit comments

Comments
 (0)