Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira committed Jan 6, 2025
1 parent 39bcb8a commit 7d728be
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ String build() {

// Add default java opts
for (String envVar : List.of("CLI_JAVA_OPTS", "ES_JAVA_OPTS")) {
if (this.envVars.containsKey(envVar)) {
this.envVars.put(envVar, this.envVars.get(envVar) + " " + DEFAULT_JAVA_OPTS);
} else {
this.envVars.put(envVar, DEFAULT_JAVA_OPTS);
}
this.envVars.put(envVar, this.envVars.getOrDefault(envVar, "") + " " + DEFAULT_JAVA_OPTS);
}

this.envVars.forEach((key, value) -> cmd.add("--env " + key + "=\"" + value + "\""));
Expand Down

0 comments on commit 7d728be

Please sign in to comment.