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

Merge pull request #5 from ethauvin/main

Fixed RunOption args parsing
This commit is contained in:
Geert Bevin 2023-08-19 23:03:15 -04:00 committed by GitHub
commit 8d707a75ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}