From 3e6cfc7baaa8e499831f0933f69db8f08c099a11 Mon Sep 17 00:00:00 2001 From: rakow Date: Wed, 18 Dec 2024 15:35:47 +0100 Subject: [PATCH] only add dependent commands if they are required --- .../src/main/java/org/matsim/application/CommandRunner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribs/application/src/main/java/org/matsim/application/CommandRunner.java b/contribs/application/src/main/java/org/matsim/application/CommandRunner.java index 443b2e7f104..cae68d22101 100644 --- a/contribs/application/src/main/java/org/matsim/application/CommandRunner.java +++ b/contribs/application/src/main/java/org/matsim/application/CommandRunner.java @@ -311,7 +311,7 @@ public void add(Class command, String... args) { // Add dependent classes for (Dependency depends : spec.dependsOn()) { - if (!this.args.containsKey(depends.value())) + if (depends.required() && !this.args.containsKey(depends.value())) add(depends.value()); } }