Refactor/整理项目对话错误相关代码 #593
@@ -73,7 +73,10 @@ const targets = [
|
||||
|
||||
function snapshot(dir) {
|
||||
const absolute = path.join(repoRoot, dir);
|
||||
if (!fs.existsSync(absolute)) return new Map();
|
||||
if (!fs.existsSync(absolute)) {
|
||||
console.warn(`目录不存在,跳过校验:${dir}`);
|
||||
return new Map();
|
||||
}
|
||||
return new Map(
|
||||
fs
|
||||
.readdirSync(absolute, { withFileTypes: true })
|
||||
|
||||
Reference in New Issue
Block a user