Skip to content

Commit

Permalink
Merge pull request ksky521#162 from WJer/master
Browse files Browse the repository at this point in the history
是否是目录-逻辑错误
  • Loading branch information
ksky521 authored Mar 29, 2017
2 parents 7213f18 + afc29a3 commit a8cf089
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,13 @@ $.isDir = function(dir, notwarning) {
return false;
}

} else {
var stat = fs.statSync(dir);
if (!stat.isDirectory()) {
if (!notwarning) {
console.log('ERROR: '.bold.red + dir + ' 不是一个正确路径');
}
return false;
}
var stat = fs.statSync(dir);
if (!stat.isDirectory()) {
if (!notwarning) {
console.log('ERROR: '.bold.red + dir + ' 不是一个正确路径');
}
return false;
}
return true;
}
Expand Down

0 comments on commit a8cf089

Please sign in to comment.