File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -640,7 +640,7 @@ exports.run = function (options) {
640
640
dirLevel += i === 0 ? dirSections [ i ] : '/' + dirSections [ i ] ;
641
641
642
642
var searchDir = sysPath . join ( cwd , dirLevel , '' ) ;
643
- if ( fs . lstatSync ( searchDir ) . isDirectory ( ) ) {
643
+ if ( fs . existsSync ( searchDir ) && fs . lstatSync ( searchDir ) . isDirectory ( ) ) {
644
644
var ykitConf = globby . sync ( [ 'ykit.*.js' , 'ykit.js' ] , { cwd : searchDir } ) [ 0 ] ;
645
645
if ( ykitConf ) {
646
646
projectDir = searchDir ;
Original file line number Diff line number Diff line change @@ -629,7 +629,7 @@ exports.run = (options) => {
629
629
dirLevel += i === 0 ? dirSections [ i ] : '/' + dirSections [ i ] ;
630
630
631
631
const searchDir = sysPath . join ( cwd , dirLevel , '' ) ;
632
- if ( fs . lstatSync ( searchDir ) . isDirectory ( ) ) {
632
+ if ( fs . existsSync ( searchDir ) && fs . lstatSync ( searchDir ) . isDirectory ( ) ) {
633
633
const ykitConf = globby . sync ( [ 'ykit.*.js' , 'ykit.js' ] , { cwd : searchDir } ) [ 0 ] ;
634
634
if ( ykitConf ) {
635
635
projectDir = searchDir ;
You can’t perform that action at this time.
0 commit comments