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; scrubDirCreated = true;
} }
const dstFile = path.join(scrubSizeDir, image); const dstFile = path.join(scrubSizeDir, image);
if (!dryRun) if (!dryRun) await fs.rename(srcFile, dstFile);
await fs.rename(srcFile, dstFile);
} else { } else {
if (!dryRun) { try {
try { if (!dryRun) await fs.unlink(srcFile);
await fs.unlink(srcFile); } catch (err) {
} catch (err) { console.error(err);
console.error(err);
}
} }
} }