Skip to content

Commit ee589d7

Browse files
committed
Merge pull request #7 from codeclimate/will/quote-file
quote filename shelling out to grep
2 parents 7eaf1d5 + 04423c4 commit ee589d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lib/fix-me.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ FixMe.prototype.find = function(file){
3535
self = this;
3636

3737
// Prepare the grep string for execution (uses BusyBox grep)
38-
var grepString = "grep -inHwoE " + fixmeStrings + " " + file;
38+
var grepString = ["grep -inHwoE", fixmeStrings, '"' + file + '"'].join(" ");
39+
3940

4041
// Execute grep with the FIXME patterns
4142
exec(grepString, function (error, stdout, stderr) {

0 commit comments

Comments
 (0)