From 32780c05bd246f6251c1586366ed8a634fee2ea8 Mon Sep 17 00:00:00 2001 From: Mike Roberts <2947595+m-roberts@users.noreply.github.com> Date: Wed, 28 Oct 2020 22:16:05 +0000 Subject: [PATCH] Switch from for loop to foreach --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index e9759ba..ca3ede1 100644 --- a/main.js +++ b/main.js @@ -117,12 +117,12 @@ async function main() { } if (targetArchitectures.length != 0) { - for (targetArchitecture in targetArchitectures) { + targetArchitectures.forEach(targetArchitecture => { runDockerExecStep( "Add target architecture: " + targetArchitecture, ["dpkg", "--add-architecture", targetArchitecture] ) - } + }) } runDockerExecStep( @@ -139,9 +139,9 @@ async function main() { ] // Used by pybuild - for (targetArchitecture in targetArchitectures) { + targetArchitectures.forEach(targetArchitecture => { devPackages.concat("libpython3.7-minimal:" + targetArchitecture) - } + }) return devPackages } @@ -157,7 +157,7 @@ async function main() { ["apt-get", "build-dep", "-y", sourceDirectory] ) - for (targetArchitecture in targetArchitectures) { + targetArchitectures.forEach(targetArchitecture => { runDockerExecStep( "Build package for architecture: " + targetArchitecture, [ @@ -165,7 +165,7 @@ async function main() { "-a" + targetArchitecture ].concat(dpkgBuildPackageOpts) ) - } + }) runDockerExecStep( "Run static analysis",