Améliorations du code en ajoutant des patterns/regex + Amélioration du mode debug

This commit is contained in:
2025-02-04 16:27:07 +01:00
parent d8cd0c785b
commit 238a02796b
9 changed files with 72 additions and 25 deletions

View File

@@ -10,9 +10,12 @@ public class CommandExecutor {
}
public void execute(Target target) {
if (!target.needsUpdate()) return;
if (!target.needsUpdate()){
System.out.println("bake: '" + target.getName() + "' is up to date.");
return;
};
try {
System.out.println("Executing: " + target.getCommand());
System.out.println(target.getCommand());
ProcessBuilder pb = new ProcessBuilder("sh", "-c", target.getCommand());
Process process = pb.start();
int exitCode = process.waitFor();