Skip to content

Commit

Permalink
Define exitValue outside try block scope
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis authored and sormuras committed Dec 17, 2023
1 parent bb4ef1d commit 2f3c192
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ int evaluate(Configuration configuration) {
mojo.debug("");
mojo.debug("Starting process...");
cmd.forEach(mojo::debug);
int exitValue = -1;
try {
Process process = builder.start();
// Java 11 debug("Process started: #%d %s", process.pid(), process.info());
Expand Down Expand Up @@ -138,7 +139,7 @@ int evaluate(Configuration configuration) {
}
return -2;
}
int exitValue = process.exitValue();
exitValue = process.exitValue();
if (captureIO) {
String encoding = mojo.getCharset();
if (encoding == null) {
Expand Down

0 comments on commit 2f3c192

Please sign in to comment.