Skip to content

Commit e25b0fb

Browse files
abetomoDeviaVir
authored andcommitted
Fix results outputs (#233)
* Change the end of sentence to semicolon * Fix not to output when there is no element
1 parent 98fc96a commit e25b0fb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/main.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ Lambda.prototype._readArchive = function (program, archive_callback) {
362362
return archive_callback(err);
363363
}
364364
fs.readFile(program.deployZipfile, archive_callback);
365-
},
365+
};
366366

367367
Lambda.prototype._archive = function (program, archive_callback) {
368368
if (program.deployZipfile && fs.existsSync(program.deployZipfile)) {
@@ -682,8 +682,15 @@ Lambda.prototype.deploy = function (program) {
682682
if (err) {
683683
throw err;
684684
}
685-
console.log('=> All tasks done. Results follow: ');
686-
console.log(JSON.stringify(results, null, ' '));
685+
const resultsIsEmpty = results.filter(function(result) {
686+
return result.filter(function(res) {
687+
return res.length > 0;
688+
}).length > 0;
689+
}).length == 0;
690+
if (!resultsIsEmpty) {
691+
console.log('=> All tasks done. Results follow: ');
692+
console.log(JSON.stringify(results, null, ' '));
693+
}
687694
});
688695
});
689696
};

0 commit comments

Comments
 (0)