Skip to content
Snippets Groups Projects
Commit 931aeb92 authored by Georg Seibt's avatar Georg Seibt :nerd:
Browse files

renaming

parent 3b2875b8
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ public class ProcessExecutor {
* The result of a command line execution.
*/
public static class ExecRes {
public int code;
public int exitCode;
public String output;
}
}
......@@ -63,7 +63,7 @@ public class GitWrapper {
String firstLine = sc.nextLine();
Matcher matcher;
if (execRes.code == EXIT_SUCCESS) {
if (execRes.exitCode == EXIT_SUCCESS) {
matcher = CLONING_INTO.matcher(firstLine);
} else {
matcher = ALREADY_EXISTS.matcher(firstLine);
......@@ -78,7 +78,7 @@ public class GitWrapper {
File repoDir = new File(parentDir, name);
String repoPath = repoDir.getAbsolutePath();
if (execRes.code == EXIT_SUCCESS) {
if (execRes.exitCode == EXIT_SUCCESS) {
LOG.fine(() -> String.format("Cloned '%s' into '%s'.", url, repoPath));
} else {
LOG.fine(() -> String.format("Found '%s' which would be produced for '%s'", repoPath, url));
......@@ -112,7 +112,7 @@ public class GitWrapper {
}
Optional<ExecRes> status = exec(directory, "rev-parse", "--is-inside-git-dir");
return status.map(res -> res.code == EXIT_SUCCESS).orElse(false);
return status.map(res -> res.exitCode == EXIT_SUCCESS).orElse(false);
}
/**
......@@ -145,9 +145,9 @@ public class GitWrapper {
Process p = b.start();
res.output = IOUtils.toString(p.getInputStream());
res.code = p.waitFor();
res.exitCode = p.waitFor();
LOG.fine(() -> String.format("Execution of '%s' returned exit code %d.", cmd, res.code));
LOG.fine(() -> String.format("Execution of '%s' returned exit code %d.", cmd, res.exitCode));
LOG.finest(() -> String.format("Execution of '%s' output:%n%s", cmd, res.output));
return Optional.of(res);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment