Update main/src/main/scala/sbt/internal/DefaultBackgroundJobService.scala

Co-authored-by: adpi2 <adrien.piquerez@gmail.com>
This commit is contained in:
eugene yokota 2024-10-01 00:46:52 -04:00 committed by GitHub
parent 1f71332edc
commit 683b09afa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -309,11 +309,11 @@ private[sbt] abstract class AbstractBackgroundJobService extends BackgroundJobSe
private[sbt] def pauseChannelDuringJob(state: State, handle: JobHandle): Unit =
currentChannel(state) match
case Some(channel) =>
val level = channel.logLevel
channel.setLevel(Level.Error)
channel.pause()
handle match
case t: ThreadJobHandle =>
val level = channel.logLevel
channel.setLevel(Level.Error)
channel.pause()
t.job.onStop: () =>
channel.setLevel(level)
channel.resume()