Skip to content

Commit

Permalink
Fixing a PR comment change
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmeldrum committed Nov 24, 2023
1 parent 803d459 commit 665dae7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ private CompletableFuture<Boolean> run(String... commands) throws IOException {
private CompletableFuture<Boolean> run(Map<String, String> 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<Integer> 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);
Expand Down

0 comments on commit 665dae7

Please sign in to comment.