replace unsupported rmSync function to unlinkSync function

Signed-off-by: herunlei <herunlei@huawei.com>
This commit is contained in:
herunlei 2022-10-20 21:57:26 +08:00
parent fb1c3b0121
commit dea34fafa0

View File

@ -56,7 +56,7 @@ const getPermissions = downloadPath => {
const convertJsonToDTS = (permissions, outputFilePath) => {
if (fs.existsSync(outputFilePath)) {
fs.rmSync(outputFilePath, { recursive: true, force: true });
fs.unlinkSync(outputFilePath);
}
fs.appendFileSync(outputFilePath, copyRight, 'utf8');
fs.appendFileSync(outputFilePath, typeHead, 'utf8');