Merge pull request #7681 from murgatroid99/node_tools_integrate_plugin

Make Node grpc-tools protoc automatically call the plugin
This commit is contained in:
Nicolas Noble 2016-08-11 15:36:20 -07:00 committed by GitHub
commit 5f3d234698
1 changed files with 5 additions and 1 deletions

View File

@ -47,7 +47,11 @@ var exe_ext = process.platform === 'win32' ? '.exe' : '';
var protoc = path.resolve(__dirname, 'protoc' + exe_ext); 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) { if (error) {
throw error; throw error;
} }