Skip to content

Commit 943b857

Browse files
author
Pavel Marek
authored
Fix withDebug benchOnly command (#8769)
1 parent 5b70ff2 commit 943b857

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

project/WithDebugCommand.scala

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,18 @@ object WithDebugCommand {
100100
state.fail
101101
case Some(taskKey) =>
102102
val extracted = Project.extract(state)
103-
val withJavaOpts = extracted.appendWithoutSession(
104-
Seq(Compile / Keys.javaOptions ++= javaOpts),
105-
state
106-
)
103+
// Append the java options also to the Benchmark configuration, in case we run `benchOnly`
104+
// task.
105+
val Benchmark = config("bench")
106+
val withJavaOpts = extracted
107+
.appendWithoutSession(
108+
Seq(Compile / Keys.javaOptions ++= javaOpts),
109+
state
110+
)
111+
.appendWithoutSession(
112+
Seq(Benchmark / Keys.javaOptions ++= javaOpts),
113+
state
114+
)
107115
Project
108116
.extract(withJavaOpts)
109117
.runInputTask(taskKey, runArgs, withJavaOpts)

0 commit comments

Comments
 (0)