Correction bug
This commit is contained in:
parent
072dc2a119
commit
c4397daad8
src/fr/monlouyan/bakefile
File diff suppressed because it is too large
Load Diff
@ -114,6 +114,8 @@ public class CommandExecutor {
|
|||||||
if (ruleNeedsUpdate) {
|
if (ruleNeedsUpdate) {
|
||||||
try {
|
try {
|
||||||
if(!isCircular && !silent){
|
if(!isCircular && !silent){
|
||||||
|
String displayCommand = BakefileParser.expandVariables(command);
|
||||||
|
|
||||||
// Afficher les lignes formatées avec traitement spécial pour les continuations
|
// Afficher les lignes formatées avec traitement spécial pour les continuations
|
||||||
if (displayLines != null && !displayLines.isEmpty()) {
|
if (displayLines != null && !displayLines.isEmpty()) {
|
||||||
boolean isFirstLine = true;
|
boolean isFirstLine = true;
|
||||||
@ -121,26 +123,34 @@ public class CommandExecutor {
|
|||||||
for (String line : displayLines) {
|
for (String line : displayLines) {
|
||||||
if (isFirstLine) {
|
if (isFirstLine) {
|
||||||
// Pour la première ligne, toujours supprimer l'indentation
|
// Pour la première ligne, toujours supprimer l'indentation
|
||||||
|
String expandedLine = line;
|
||||||
if (line.startsWith("\t")) {
|
if (line.startsWith("\t")) {
|
||||||
System.out.println(line.substring(1));
|
String content = line.substring(1);
|
||||||
|
expandedLine = "\t" + BakefileParser.expandVariables(content);
|
||||||
|
System.out.println(expandedLine.substring(1));
|
||||||
} else {
|
} else {
|
||||||
System.out.println(line);
|
expandedLine = BakefileParser.expandVariables(line);
|
||||||
|
System.out.println(expandedLine);
|
||||||
}
|
}
|
||||||
isFirstLine = false;
|
isFirstLine = false;
|
||||||
} else {
|
} else {
|
||||||
// Pour les lignes suivantes d'une continuation, conserver l'indentation
|
// Pour les lignes suivantes d'une continuation, conserver l'indentation
|
||||||
System.out.println(line);
|
String expandedLine = BakefileParser.expandVariables(line);
|
||||||
|
System.out.println(expandedLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Cas d'une commande simple (une seule ligne)
|
// Cas d'une commande simple (une seule ligne)
|
||||||
if (command.startsWith("\t")) {
|
if (displayCommand.startsWith("\t")) {
|
||||||
System.out.println(command.substring(1));
|
System.out.println(displayCommand.substring(1));
|
||||||
} else {
|
} else {
|
||||||
System.out.println(command);
|
System.out.println(displayCommand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
actualCommand = BakefileParser.expandVariables(actualCommand);
|
||||||
|
|
||||||
if (debug) System.out.println("Debug: Executing " + actualCommand);
|
if (debug) System.out.println("Debug: Executing " + actualCommand);
|
||||||
ProcessBuilder pb = new ProcessBuilder("sh", "-c", actualCommand);
|
ProcessBuilder pb = new ProcessBuilder("sh", "-c", actualCommand);
|
||||||
pb.inheritIO();
|
pb.inheritIO();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user