Clarify boolean flag

I found this difficult to read.
This commit is contained in:
Ethan Atkins 2020-07-09 09:14:52 -07:00
parent d74a10aad1
commit de1423d662
1 changed files with 5 additions and 3 deletions

View File

@ -92,12 +92,14 @@ private[sbt] class CheckBuildSources extends AutoCloseable {
val filter = (c: String) =>
c == LoadProject || c == RebootCommand || c == TerminateAction || c == Shutdown ||
c.startsWith("sbtReboot")
val res = !commands.exists(filter)
if (!res) {
val resetState = commands.exists(filter)
if (resetState) {
previousStamps.set(getStamps(force = true))
needUpdate.set(false)
}
res
// We don't need to do a check since we just updated the stamps since
// we are about to perform a reload or reboot.
!resetState
}
@inline private def forceCheck = fileTreeRepository.isEmpty
private[sbt] def needsReload(state: State, cmd: String) = {