Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…security#1655) Find the `*.proto` files and run in a `for loop` to run `protoc` for each file in a separated command. If fail, `|| exit` will exit with the returned error. The POSIX standard specifies that the return status of `find` is 0 unless an error occurred while traversing the directories; the return status of executed commands doesn't enter into it. To overcome this limitation, the `-exec ... +` pattern could be used From the docs (https://man7.org/linux/man-pages/man1/find.1.html): "If any invocation with the `+' form returns a non-zero value as exit status, then find returns a non-zero exit status." But as well, "This variant of the -exec action runs the specified command on the selected files, but the command line is built by appending each selected file name at the end;" Unfortunately, at the moment `protoc-gen-twirp` plugin doesn't support multiple files from different packages when the `go_package` option is explicitly mentioned. https://github.com/twitchtv/twirp/blob/main/protoc-gen-twirp/generator.go#L181-L185 Signed-off-by: Yuval Goldberg <[email protected]>
- Loading branch information