2
0
Fork 0
mirror of https://github.com/ethauvin/bld.git synced 2025-04-25 16:27:11 -07:00

Fixed RunOption args parsing

This commit is contained in:
Erik C. Thauvin 2023-08-19 18:38:44 -07:00
parent 912ba87c12
commit c635b25b6f

View file

@ -57,18 +57,16 @@ public class RunOperation extends AbstractProcessOperation<RunOperation> {
// parse the run arguments if any
var args = project.arguments();
while (!args.isEmpty()) {
if (!args.isEmpty()) {
var arg = args.get(0);
if (arg.startsWith("-")) {
args.remove(0);
if (arg.startsWith(ARGS_OPTION)) {
args.remove(0);
var runArgs = arg.substring(ARGS_OPTION.length());
if (!runArgs.isBlank()) {
runOptions_.addAll(0, Arrays.asList(runArgs.split(" ")));
}
}
}
}
return operation;
}