mirror of https://github.com/sbt/sbt.git
Adds null check for 'sbt.managedChecksums' in ivySettings file
Fixes #195
This commit is contained in:
parent
5b585b7a58
commit
7770fa64e9
|
|
@ -4,27 +4,30 @@
|
|||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import ivyint.CachedResolutionResolveEngine
|
||||
|
||||
import ivyint.CachedResolutionResolveEngine
|
||||
import org.apache.ivy.Ivy
|
||||
import org.apache.ivy.core.{ IvyPatternHelper, LogOptions }
|
||||
import org.apache.ivy.core.deliver.DeliverOptions
|
||||
import org.apache.ivy.core.install.InstallOptions
|
||||
import org.apache.ivy.core.module.descriptor.{
|
||||
Artifact => IArtifact,
|
||||
DefaultModuleDescriptor,
|
||||
MDArtifact,
|
||||
ModuleDescriptor,
|
||||
DefaultModuleDescriptor
|
||||
Artifact => IArtifact
|
||||
}
|
||||
import org.apache.ivy.core.resolve.ResolveOptions
|
||||
import org.apache.ivy.plugins.resolver.{ BasicResolver, DependencyResolver }
|
||||
import org.apache.ivy.util.filter.{ Filter => IvyFilter }
|
||||
import sbt.io.{ IO, PathFinder }
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement.{ ModuleDescriptorConfiguration => InlineConfiguration, _ }, syntax._
|
||||
import sbt.librarymanagement.{ ModuleDescriptorConfiguration => InlineConfiguration, _ }
|
||||
import syntax._
|
||||
import InternalDefaults._
|
||||
import UpdateClassifiersUtil._
|
||||
|
||||
import scala.util.Try
|
||||
|
||||
object IvyActions {
|
||||
|
||||
/** Installs the dependencies of the given 'module' from the resolver named 'from' to the resolver named 'to'.*/
|
||||
|
|
@ -382,7 +385,11 @@ object IvyActions {
|
|||
report: UpdateReport,
|
||||
config: RetrieveConfiguration
|
||||
): UpdateReport = {
|
||||
val copyChecksums = ivy.getVariable(ConvertResolver.ManagedChecksums).toBoolean
|
||||
val copyChecksums =
|
||||
Option(ivy.getVariable(ConvertResolver.ManagedChecksums)) match {
|
||||
case Some(x) => x.toBoolean
|
||||
case _ => false
|
||||
}
|
||||
val toRetrieve: Option[Vector[ConfigRef]] = config.configurationsToRetrieve
|
||||
val base = getRetrieveDirectory(config.retrieveDirectory)
|
||||
val pattern = getRetrievePattern(config.outputPattern)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ class GigahorseUrlHandler extends AbstractURLHandler {
|
|||
|
||||
if (checkStatusCode(url, response)) {
|
||||
val bodyCharset =
|
||||
BasicURLHandler.getCharSetFromContentType(Option(response.body().contentType()).map(_.toString).orNull)
|
||||
BasicURLHandler.getCharSetFromContentType(
|
||||
Option(response.body().contentType()).map(_.toString).orNull)
|
||||
Some(
|
||||
new SbtUrlInfo(true,
|
||||
response.body().contentLength(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue