Permalink
Browse files

Short circuit some inject cases

  • Loading branch information...
1 parent bf972e9 commit 4c1939fabc793c93096a3797859b86b5061ad3fe @temas temas committed Mar 18, 2013
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/podClient.js
View
@@ -263,6 +263,17 @@ exports.pipelineInject = function(bases, auth, cbDone) {
});
} else {
console.log("Running a local inject for %s of %d entries!", base, typeof bases[base] == "array" ? bases[base].length : 0);
+ if (typeof bases[base] != "array") {
+ logger.error("Busted entry is not an array");
+ return cbStep();
+ }
+
+ if (bases[base].length === 0) {
+ // Skip it all, nothing to do
+ return cbStep();
+ }
+
+ if (bases[base
var singleBase = {};
singleBase[base] = bases[base];
return pipeline.inject(singleBase, auth, function(err, timings) {

0 comments on commit 4c1939f

Please sign in to comment.