package com.heroku.sdk.deploy.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;

public class HerokuCli {

    public static Optional<String> runAuthToken(Path workingDirectory) throws IOException {
        return Optional.ofNullable(runRaw(workingDirectory,"auth:token").get(0));
    }

    private static List<String> runRaw(Path workingDirectory, String... command) throws IOException {
        List<String> fullCommand = Arrays.asList(command);
        fullCommand.add(0, "heroku");

        ProcessBuilder processBuilder = new ProcessBuilder(fullCommand);
        processBuilder.directory(workingDirectory.toFile());
        Process process = processBuilder.start();

        try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()))) {
            return bufferedReader.lines().collect(Collectors.toList());
        }
    }
}

@@ -150,16 +150,44 @@
 e.Path;%0A
+import java.util.ArrayList;%0A
 import j
@@ -634,16 +634,33 @@
 mmand = 
+ new ArrayList%3C%3E(
 Arrays.a
@@ -669,24 +669,25 @@
 ist(command)
+)
 ;%0A        fu

Fix issue in deploy