Correction bug finale
This commit is contained in:
parent
bafb43f052
commit
e650145a2e
@ -192,13 +192,16 @@ public class BakefileParser {
|
|||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
String cleanedStr = depStr.replaceAll("\\\\\\s*", " ");
|
// D'abord remplacer les variables
|
||||||
|
String expandedStr = replaceVariables(depStr);
|
||||||
|
|
||||||
|
// Puis diviser en dépendances individuelles
|
||||||
List<String> deps = new ArrayList<>();
|
List<String> deps = new ArrayList<>();
|
||||||
StringBuilder currentDep = new StringBuilder();
|
StringBuilder currentDep = new StringBuilder();
|
||||||
boolean inQuotes = false;
|
boolean inQuotes = false;
|
||||||
|
|
||||||
for (int i = 0; i < cleanedStr.length(); i++) {
|
for (int i = 0; i < expandedStr.length(); i++) {
|
||||||
char c = cleanedStr.charAt(i);
|
char c = expandedStr.charAt(i);
|
||||||
|
|
||||||
if (c == '"') {
|
if (c == '"') {
|
||||||
inQuotes = !inQuotes;
|
inQuotes = !inQuotes;
|
||||||
@ -229,10 +232,7 @@ public class BakefileParser {
|
|||||||
System.out.println("Debug: Split dependencies: " + deps);
|
System.out.println("Debug: Split dependencies: " + deps);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Appliquer replaceVariables à chaque dépendance
|
return deps;
|
||||||
return deps.stream()
|
|
||||||
.map(this::replaceVariables)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user