Convert last forEach call to a for loop

This commit is contained in:
Jack Boswell (boswelja)
2020-11-06 20:44:43 +13:00
parent cdd4e28c71
commit d522a8f9de
2 changed files with 4 additions and 4 deletions

View File

@@ -76,12 +76,12 @@ function run() {
userFractionFloat = undefined;
}
// Check release files
releaseFiles.forEach(releaseFile => {
for (const releaseFile in releaseFiles) {
if (!fs.existsSync(releaseFile)) {
core.setFailed(`Unable to find release file @ ${releaseFile}`);
return;
}
});
}
if (whatsNewDir != undefined && whatsNewDir.length > 0 && !fs.existsSync(whatsNewDir)) {
core.setFailed(`Unable to find 'whatsnew' directory @ ${whatsNewDir}`);
return;

View File

@@ -52,12 +52,12 @@ async function run() {
}
// Check release files
releaseFiles.forEach(releaseFile => {
for (const releaseFile in releaseFiles) {
if (!fs.existsSync(releaseFile)) {
core.setFailed(`Unable to find release file @ ${releaseFile}`);
return
}
});
}
if (whatsNewDir != undefined && whatsNewDir.length > 0 && !fs.existsSync(whatsNewDir)) {
core.setFailed(`Unable to find 'whatsnew' directory @ ${whatsNewDir}`);