Skip to content

Commit

Permalink
Merge branch 'feature-executable-handles-non-html-files' of https://g…
Browse files Browse the repository at this point in the history
  • Loading branch information
yaniswang committed Oct 6, 2015
2 parents 7c5f2f6 + ee7b71a commit d7baab3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/htmlhint
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,16 @@ function getAllFiles(arrTargets){
var arrAllFiles = [];
if(arrTargets.length > 0){
for(var i=0,l=arrTargets.length;i<l;i++){
getFiles(arrTargets[i], arrAllFiles);
var filepath = path.resolve(process.cwd(), arrTargets[i]);
if(fs.existsSync(filepath) !== false){
if(fs.statSync(filepath).isFile) {
arrAllFiles.push(filepath);
} else {
getFiles(arrTargets[i], arrAllFiles);
}
} else {
console.log('File %s does not exist'.red, arrTargets[i]);
}
}
}
else{
Expand Down

0 comments on commit d7baab3

Please sign in to comment.