Chromium Code Reviews| Index: tools/protoc_wrapper/protoc_wrapper.py |
| diff --git a/tools/protoc_wrapper/protoc_wrapper.py b/tools/protoc_wrapper/protoc_wrapper.py |
| index 8eac88409c676381924f822e3d2fe924e696663a..916508a2a06f7a15e38fed2e71f87d713e507ba8 100755 |
| --- a/tools/protoc_wrapper/protoc_wrapper.py |
| +++ b/tools/protoc_wrapper/protoc_wrapper.py |
| @@ -89,7 +89,8 @@ def main(argv): |
| help="Standard C++ generator options.") |
| parser.add_argument("--include", |
| help="Name of include to insert into generated headers.") |
| - |
| + parser.add_argument("--import-dir", nargs='*', |
| + help="Name of include to insert into generated headers.") |
|
xyzzyz
2017/01/20 18:27:40
Please update the help text.
Ramin Halavati
2017/01/23 14:27:06
Done.
|
| parser.add_argument("protos", nargs="+", |
| help="Input protobuf definition file(s).") |
| @@ -122,6 +123,11 @@ def main(argv): |
| protoc_cmd += ["--proto_path", proto_dir] |
| protoc_cmd += [os.path.join(proto_dir, name) for name in protos] |
| + |
| + if options.import_dir: |
| + protoc_cmd += ["--proto_path"] |
| + protoc_cmd += options.import_dir |
|
xyzzyz
2017/01/20 18:27:40
Isn't options.import_dir a list? You should probab
Ramin Halavati
2017/01/23 14:27:06
Yes, it had to be changed into looping through the
|
| + |
| ret = subprocess.call(protoc_cmd) |
| if ret != 0: |
| raise RuntimeError("Protoc has returned non-zero status: " |