@@ -439,11 +439,11 @@ ApiRepo.prototype.buildCommonProtoPkgs =
439439 * @param {function(?Error, string[]) } done - The callback.
440440 */
441441ApiRepo . prototype . _collectProtoDeps = function _collectProtoDeps (
442- includePath , env , protoFile , done ) {
442+ includePath , protoFile , done ) {
443443 var deps = tmp . fileSync ( ) ;
444444 var desc = tmp . fileSync ( ) ;
445- var args = this . protoCompilerArgs . concat (
446- [ '--dependency_out=' + deps . name , '-o' , desc . name ] ) ;
445+ var args = this . protoCompilerArgs ? this . protoCompilerArgs . split ( ' ' ) : [ ] ;
446+ args . push ( '--dependency_out=' + deps . name , '-o' , desc . name ) ;
447447 if ( includePath ) {
448448 includePath . forEach ( function ( ipath ) {
449449 args . push ( '-I' , ipath ) ;
@@ -452,7 +452,7 @@ ApiRepo.prototype._collectProtoDeps = function _collectProtoDeps(
452452 args . push ( protoFile ) ;
453453 // Invokes protoc with --dependency_out to generate the dependency
454454 // proto files.
455- execFile ( this . protoCompiler , args , { env : env } , function ( err ) {
455+ execFile ( this . protoCompiler , args , { env : this . env } , function ( err ) {
456456 if ( err ) {
457457 done ( err ) ;
458458 }
@@ -580,7 +580,7 @@ ApiRepo.prototype._buildProtos =
580580 var outDir = path . join ( langTopDir , 'proto' ) ;
581581 async . map (
582582 fullPathProtos ,
583- this . _collectProtoDeps . bind ( null , includePath , this . opts . env ) ,
583+ this . _collectProtoDeps . bind ( this , includePath ) ,
584584 function ( err , fileLists ) {
585585 if ( err ) {
586586 findOutputs ( err ) ;
0 commit comments