From 665dae780256cd3f14e3802eb12f5d075abc4e79 Mon Sep 17 00:00:00 2001 From: Greg Meldrum Date: Fri, 24 Nov 2023 11:49:18 -0500 Subject: [PATCH] Fixing a PR comment change --- .../agent/plugin/terraform/client/TerraformClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/terraform-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/terraform/client/TerraformClient.java b/service/terraform-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/terraform/client/TerraformClient.java index 125b8eb6..ef1b1dd9 100644 --- a/service/terraform-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/terraform/client/TerraformClient.java +++ b/service/terraform-plugin/src/main/java/com/solace/maas/ep/event/management/agent/plugin/terraform/client/TerraformClient.java @@ -143,12 +143,12 @@ private CompletableFuture run(String... commands) throws IOException { private CompletableFuture run(Map envVars, String... commands) throws IOException { assert commands.length > 0; ProcessLauncher[] launchers = new ProcessLauncher[commands.length]; - for (int i = 0; i < launchers.length; i++) { + for (int i = 0; i < commands.length; i++) { launchers[i] = getTerraformLauncher(commands[i], envVars); } CompletableFuture result = launchers[0].launch().thenApply(c -> c == 0 ? 1 : -1); - for (int i = 1; i < commands.length; i++) { + for (int i = 1; i < launchers.length; i++) { result = result.thenCompose(index -> { if (index > 0) { return launchers[index].launch().thenApply(c -> c == 0 ? index + 1 : -1);