Skip to content
This repository was archived by the owner on Jan 26, 2018. It is now read-only.

Commit 9dab7ce

Browse files
committed
Fix rebase failures
1 parent 91a36f5 commit 9dab7ce

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

lib/api_repo.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,11 @@ ApiRepo.prototype.buildCommonProtoPkgs =
439439
* @param {function(?Error, string[])} done - The callback.
440440
*/
441441
ApiRepo.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);

test/api_repo.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ describe('ApiRepo', function() {
106106
env: {PATH: fakes.path},
107107
includePath: [path.join(__dirname, 'fixtures', 'include')],
108108
languages: ['nodejs'],
109-
templateRoot: path.join(__dirname, '..', 'templates')
109+
templateRoot: path.join(__dirname, '..', 'templates'),
110+
protoCompiler: 'echo'
110111
});
111112
getsGoodZipFrom(repo.zipUrl);
112113
});

test/fixtures/fake_protoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
main() {
2222
echo $@ # first echo, the protoc tests need that.
23-
if [ -z `echo "$@" | grep -o 'grpc_out'` ]; then
24-
return
25-
fi
2623

2724
local proto_path=${!#}
2825
local out_dir=$(echo "$@" | sed 's/.*--grpc_out=\([^ ]*\).*/\1/')

0 commit comments

Comments
 (0)