Guard ManagedChecksums setting retrieval

This setting doesn't exist for ivysettings.xml, which then causes null problem.

Fixes sbt/librarymanagement#110
This commit is contained in:
Eugene Yokota 2017-05-30 00:32:44 -04:00
parent fae2b0de51
commit 128798247c
1 changed files with 4 additions and 1 deletions

View File

@ -155,7 +155,10 @@ private[sbt] object ConvertResolver {
/** The default implementation of converter. */
lazy val defaultConvert: ResolverConverter = {
case (r, settings, log) =>
val managedChecksums = settings.getVariable(ManagedChecksums).toBoolean
val managedChecksums = Option(settings.getVariable(ManagedChecksums)) match {
case Some(x) => x.toBoolean
case _ => false
}
r match {
case repo: MavenRepository => {
val pattern = Collections.singletonList(