Skip to content

Commit 60ba77e

Browse files
authored
fix(internal/gapicgen): skip empty file paths in gatherChanges (#13198)
refs: #13188 refs: #13189
1 parent 6118f02 commit 60ba77e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/gapicgen/generator/generator.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func Generate(ctx context.Context, conf *Config) ([]*git.ChangeInfo, error) {
5252
var err error
5353
changes, err = gatherChanges(conf.GoogleapisDir, conf.GenprotoDir)
5454
if err != nil {
55-
return nil, fmt.Errorf("error gathering commit info")
55+
return nil, fmt.Errorf("error gathering commit info: %w", err)
5656
}
5757
if err := recordGoogleapisHash(conf.GoogleapisDir, conf.GenprotoDir); err != nil {
5858
return nil, err
@@ -80,6 +80,9 @@ func gatherChanges(googleapisDir, genprotoDir string) ([]*git.ChangeInfo, error)
8080
}
8181
protos := make(map[string]struct{})
8282
for _, file := range files {
83+
if file == "" {
84+
continue
85+
}
8386
if !strings.HasSuffix(file, ".proto") {
8487
continue
8588
}

0 commit comments

Comments
 (0)