Skip to content

Commit

Permalink
Fix forked JVM args duplication when auto-configuring Gradle test tas…
Browse files Browse the repository at this point in the history
…ks (#6151)
  • Loading branch information
nikita-tkachenko-datadog authored Nov 6, 2023
1 parent 0345c95 commit 63c6b42
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ class GradleProjectConfigurator {

jvmArgs.add("-javaagent:" + config.ciVisibilityAgentJarFile.toPath())

task.jvmArgs(jvmArgs)
// be sure to use setJvmArgs() and not jvmArgs()
// as the latter will add the arguments rather than replacing them
task.setJvmArgs(jvmArgs)
}

private static final Pattern PROJECT_PROPERTY_REFERENCE = Pattern.compile("\\\$\\{([^}]+)\\}")
Expand Down

0 comments on commit 63c6b42

Please sign in to comment.