mirror of https://github.com/sbt/sbt.git
Keep "using" change in sbt.version mismatch messaging.
This commit is contained in:
parent
56aa46308b
commit
f5e73b610a
|
|
@ -823,14 +823,15 @@ object BuiltinCommands {
|
||||||
|
|
||||||
val sbtVersionOpt = sbtVersionSystemOpt.orElse(sbtVersionBuildOpt)
|
val sbtVersionOpt = sbtVersionSystemOpt.orElse(sbtVersionBuildOpt)
|
||||||
|
|
||||||
val app = state.configuration.provider
|
sbtVersionOpt.foreach { version =>
|
||||||
sbtVersionOpt.foreach(
|
val appVersion = state.configuration.provider.id.version()
|
||||||
version =>
|
if (version != appVersion) {
|
||||||
if (version != app.id.version()) {
|
state.log.warn(
|
||||||
state.log.warn(s"""sbt version mismatch, current: ${app.id
|
s"sbt version mismatch, using: $appVersion, " +
|
||||||
.version()}, in build.properties: "$version", use 'reboot' to use the new value.""")
|
s"""in build.properties: "$version", use 'reboot' to use the new value.""".stripMargin
|
||||||
}
|
)
|
||||||
)
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def doLoadProject(s0: State, action: LoadAction.Value): State = {
|
def doLoadProject(s0: State, action: LoadAction.Value): State = {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,6 @@ TaskKey[Unit]("checkSbtVersionWarning") := {
|
||||||
val logging = state.globalLogging
|
val logging = state.globalLogging
|
||||||
val currVersion = state.configuration.provider.id.version()
|
val currVersion = state.configuration.provider.id.version()
|
||||||
val contents = IO.read(logging.backing.file)
|
val contents = IO.read(logging.backing.file)
|
||||||
assert(contents.contains(s"""sbt version mismatch, current: $currVersion, in build.properties: "1.1.1", use 'reboot' to use the new value."""))
|
assert(contents.contains(s"""sbt version mismatch, using: $currVersion, in build.properties: "1.1.1", use 'reboot' to use the new value."""))
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue