mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 00:07:12 -07:00
Improved @filename options parsing
This commit is contained in:
parent
002844861b
commit
e2cc7a6782
1 changed files with 10 additions and 1 deletions
|
@ -107,7 +107,16 @@ public class JlinkOperation extends AbstractToolProviderOperation<JlinkOperation
|
|||
for (var option : options_) {
|
||||
try (var scanner = new Scanner(new File(option))) {
|
||||
while (scanner.hasNext()) {
|
||||
list.addAll(List.of(scanner.next().split(" ")));
|
||||
var splitLine = scanner.nextLine().split("--");
|
||||
for (String args : splitLine) {
|
||||
if (!args.isEmpty()) {
|
||||
var splitArgs = args.split(" ", 2);
|
||||
list.add("--" + splitArgs[0]);
|
||||
if (splitArgs.length > 1 && !splitArgs[1].isEmpty()) {
|
||||
list.add(splitArgs[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue