aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2016-08-09 11:35:19 -0700
committerGravatar murgatroid99 <mlumish@google.com>2016-08-09 11:35:19 -0700
commit80db7f8c6e927527ce9d3bf8c79cf1175845ad90 (patch)
treeedf046811f263e361c0a23973763f62e9319e588 /src
parent10776b99cfa17dceae79f2e96d6b694b3d636db2 (diff)
Make Node grpc-tools protoc automatically call the plugin
Diffstat (limited to 'src')
-rwxr-xr-xsrc/node/tools/bin/protoc.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/node/tools/bin/protoc.js b/src/node/tools/bin/protoc.js
index 53fc5dc428..7f8356867a 100755
--- a/src/node/tools/bin/protoc.js
+++ b/src/node/tools/bin/protoc.js
@@ -47,7 +47,11 @@ var exe_ext = process.platform === 'win32' ? '.exe' : '';
var protoc = path.resolve(__dirname, 'protoc' + exe_ext);
-var child_process = execFile(protoc, process.argv.slice(2), function(error, stdout, stderr) {
+var plugin = path.resolve(__dirname, 'grpc_node_plugin' + exe_ext);
+
+var args = ['--plugin=protoc-gen-grpc=' + plugin].concat(process.argv.slice(2));
+
+var child_process = execFile(protoc, args, function(error, stdout, stderr) {
if (error) {
throw error;
}