8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents df1a1e4 + f7f966d commit a44e8d4Copy full SHA for a44e8d4
lib/fix-me.js
@@ -38,14 +38,17 @@ FixMe.prototype.runEngine = function(){
38
FixMe.prototype.find = function(files, strings){
39
var fixmeStrings = '(' + strings.join('|') + ')';
40
var grep = spawn('grep', ['-nHwoEr', fixmeStrings].concat(files));
41
+ var output = "";
42
var self = this;
43
- grep.stdout.on('data', function (data) {
44
- var results = data.toString();
+ grep.stdout.on('data', function(data) {
45
+ output += data.toString();
46
+ });
47
- if (results !== ""){
48
+ grep.on('exit', function() {
49
+ if (output !== ""){
50
// Parses grep output
- var lines = results.split("\n");
51
+ var lines = output.split("\n");
52
53
lines.forEach(function(line, index, array){
54
// grep spits out an extra line that we can ignore
0 commit comments