Skip to content

Commit

Permalink
Add --version flag to main
Browse files Browse the repository at this point in the history
  • Loading branch information
meling committed Apr 28, 2022
1 parent 67da097 commit c91e785
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions javascript/net/grpc/web/generator/grpc_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1735,6 +1735,10 @@ class GrpcCodeGenerator : public CodeGenerator {
} // namespace grpc

int main(int argc, char* argv[]) {
if (argc == 2 && std::string(argv[1]) == "--version") {
std::cout << argv[0] << " " << grpc::web::GetVersion() << std::endl;
return 0;
}
grpc::web::GrpcCodeGenerator generator;
PluginMain(argc, argv, &generator);
return 0;
Expand Down

0 comments on commit c91e785

Please sign in to comment.