Skip to content

Commit ec07563

Browse files
Copilotquintesse
andcommitted
Fix argument ordering in alias commands by using only @unmatched annotation
Co-authored-by: quintesse <778793+quintesse@users.noreply.github.com>
1 parent 8958d74 commit ec07563

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/main/java/org/codejive/jpm/Main.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -423,15 +423,12 @@ abstract static class DoAlias implements Callable<Integer> {
423423
@Override
424424
public Integer call() throws Exception {
425425
try {
426-
// Combine regular args and unmatched args for pass-through
427-
ArrayList<String> allArgs = new ArrayList<>(doAliasMixin.args);
428-
allArgs.addAll(unmatchedArgs);
429-
426+
// Use only unmatched args for pass-through to preserve ordering
430427
return Jpm.builder()
431428
.directory(doAliasMixin.depsMixin.directory)
432429
.noLinks(doAliasMixin.depsMixin.noLinks)
433430
.build()
434-
.executeAction(actionName(), allArgs);
431+
.executeAction(actionName(), unmatchedArgs);
435432
} catch (Exception e) {
436433
System.err.println(e.getMessage());
437434
return 1;
@@ -496,12 +493,7 @@ static class DepsMixin {
496493
static class DoAliasMixin {
497494
@Mixin DepsMixin depsMixin;
498495

499-
@Parameters(
500-
paramLabel = "arguments",
501-
description = "Optional arguments to be passed to the action",
502-
arity = "0..*",
503-
index = "0..*")
504-
ArrayList<String> args = new ArrayList<>();
496+
// Remove @Parameters - let @Unmatched in DoAlias handle everything
505497
}
506498

507499
static class ArtifactsMixin {

0 commit comments

Comments
 (0)