Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fs.unlink(itemPath)
// eslint-disable-next-line promise/prefer-await-to-then
.then(() => {
cleanedFilesCount++;
}).catch(() => {});
})).finally(() => {
if (cleanedFilesCount > 0) {
log.info(`Successfully cleaned up ${cleanedFilesCount} ` +
`temporary XCTest log file${cleanedFilesCount === 1 ? '' : 's'}`);
}
}).catch(() => {});
log.debug(`Started background XCTest logs cleanup in '${tmpDir}'`);
if (await fs.exists(logsRoot)) {
log.info(`Cleaning test logs in '${logsRoot}' folder`);
await iosUtils.clearLogs([logsRoot]);
return;
}
log.info(`There is no ${logsRoot} folder, so not cleaning files`);
}