We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f55b21d commit ee7b71aCopy full SHA for ee7b71a
bin/htmlhint
100644
100755
@@ -79,7 +79,16 @@ function getAllFiles(arrTargets){
79
var arrAllFiles = [];
80
if(arrTargets.length > 0){
81
for(var i=0,l=arrTargets.length;i<l;i++){
82
- getFiles(arrTargets[i], arrAllFiles);
+ var filepath = path.resolve(process.cwd(), arrTargets[i]);
83
+ if(fs.existsSync(filepath) !== false){
84
+ if(fs.statSync(filepath).isFile) {
85
+ arrAllFiles.push(filepath);
86
+ } else {
87
+ getFiles(arrTargets[i], arrAllFiles);
88
+ }
89
90
+ console.log('File %s does not exist'.red, arrTargets[i]);
91
92
}
93
94
else{
@@ -144,4 +153,4 @@ function quit(code){
144
153
} else {
145
154
process.exit(code || 0);
146
155
147
-}
156
+}
0 commit comments