mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修复创建脚本可能失败
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user