修复创建脚本可能失败

This commit is contained in:
whyour
2025-05-20 01:00:08 +08:00
parent b6ea8565ec
commit 1a185f5682
28 changed files with 213 additions and 279 deletions
+3 -1
View File
@@ -116,7 +116,9 @@ export default async () => {
`Neither content nor source specified for ${item.target}`,
);
}
const content = item.content || (await fs.readFile(item.source!));
const content =
item.content ||
(await fs.readFile(item.source!, { encoding: 'utf-8' }));
await writeFileWithLock(item.target, content);
}
}