Bug fixed: missing awaits on fs.write
gitea/docker-discover/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2021-12-01 11:55:33 +01:00
parent 0e54ff0eaa
commit a9f157bff1
1 changed files with 4 additions and 4 deletions

View File

@ -307,12 +307,12 @@ async function updateProxy(firstRun) {
);
const fd = await fs.open(`${mapDir}/${file}.map`, 'w+');
files[file].forEach(map => {
for (const map of files[file]) {
if (Array.isArray(map))
fs.write(fd, `${map[0]} ${map[1]}\n`);
await fs.write(fd, `${map[0]} ${map[1]}\n`);
else
fs.write(fd, `${map}\n`);
});
await fs.write(fd, `${map}\n`);
}
await fs.close(fd);
}