Améliorations du code en ajoutant des patterns/regex + Amélioration du mode debug
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user