log error expect file doesn't exist
This commit is contained in:
parent
b3ccfe9d34
commit
11f2ce7110
1 changed files with 4 additions and 0 deletions
|
@ -188,6 +188,10 @@ export async function isFolder(dirPath: string) {
|
|||
const stats = await fs.stat(dirPath);
|
||||
return stats.isDirectory();
|
||||
} catch (e) {
|
||||
// ENOENT means the file does not exist
|
||||
if (e?.code !== 'ENOENT') {
|
||||
logError(e, 'isFolder failed ');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue