refs #5553 Code syntax refactor
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2023-04-18 17:25:37 +02:00
parent 26faab6a84
commit 8763dc32c4
1 changed files with 5 additions and 8 deletions

View File

@ -90,15 +90,12 @@ module.exports = Self => {
scrubDirCreated = true;
}
const dstFile = path.join(scrubSizeDir, image);
if (!dryRun)
await fs.rename(srcFile, dstFile);
if (!dryRun) await fs.rename(srcFile, dstFile);
} else {
if (!dryRun) {
try {
await fs.unlink(srcFile);
} catch (err) {
console.error(err);
}
try {
if (!dryRun) await fs.unlink(srcFile);
} catch (err) {
console.error(err);
}
}