Skip to content

Commit 34df2ca

Browse files
authored
Fix protogen to only compile .proto files (#238)
The glob pattern in runProtoc matched all files in proto directories, which breaks compilation when non-proto files (e.g. .yaml service definitions) are present alongside .proto files. Made-with: Cursor
1 parent 42637b1 commit 34df2ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/protogen/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func runProtoc(ctx context.Context, cfg genConfig, protoDirs []string) error {
138138

139139
for i := 0; i < len(protoDirs); i++ {
140140
dir := protoDirs[i]
141-
files, err := filepath.Glob(filepath.Join(dir, "*"))
141+
files, err := filepath.Glob(filepath.Join(dir, "*.proto"))
142142
if err != nil {
143143
return err
144144
}

0 commit comments

Comments
 (0)