Skip to content

Commit

Permalink
Do not log null build log file (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Mar 23, 2023
1 parent 2ee0e8a commit 5b24455
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,17 @@ public void run(
}
cmd.addAll(mavenArgs);
cmd.addAll(List.of(args));
LOGGER.log(
Level.INFO,
"Running {0} in {1} >> {2}",
new Object[] {String.join(" ", cmd), baseDirectory, buildLogFile});
if (buildLogFile != null) {
LOGGER.log(
Level.INFO,
"Running {0} in {1} >> {2}",
new Object[] {String.join(" ", cmd), baseDirectory, buildLogFile});
} else {
LOGGER.log(
Level.INFO,
"Running {0} in {1}",
new Object[] {String.join(" ", cmd), baseDirectory});
}
Process p;
try {
p = new ProcessBuilder(cmd).directory(baseDirectory).redirectErrorStream(true).start();
Expand Down

0 comments on commit 5b24455

Please sign in to comment.