Skip to content

Commit

Permalink
More print statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnmcmanus committed Apr 18, 2021
1 parent e9f2278 commit f5b2789
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -105,6 +106,19 @@ private BuildResult buildFakeProject() throws IOException {
}

private static Optional<File> getGradleInstallation() throws IOException {
Process proc = new ProcessBuilder("/bin/sh", "-c", "type gradle").start();
try (InputStream in = proc.getInputStream()) {
int c;
while ((c = in.read()) >= 0) {
System.err.print((char) c);
}
}
System.err.println();
try {
proc.waitFor();
} catch (InterruptedException e) {
throw new AssertionError(e);
}
File installation = new File("/usr/share/gradle");
if (!installation.isDirectory()) {
System.err.println("/usr/share/gradle does not exist");
Expand Down

0 comments on commit f5b2789

Please sign in to comment.