mirror of https://github.com/sbt/sbt.git
Fix validatePatterns
https://github.com/sbt/librarymanagement/pull/312 had a bug.
This commit is contained in:
parent
9e1d4295e7
commit
a9873101bf
|
|
@ -417,9 +417,15 @@ private[librarymanagement] abstract class ResolverFunctions {
|
|||
log.warn(s"insecure HTTP request is deprecated '$value'; switch to HTTPS")
|
||||
}
|
||||
private[sbt] def validatePatterns(patterns: Patterns): Unit = {
|
||||
val ivy = patterns.ivyPatterns.headOption map (_.startsWith("http:"))
|
||||
val art = patterns.artifactPatterns.headOption map (_.startsWith("http:"))
|
||||
(ivy orElse art) foreach { _ =>
|
||||
val ivy = patterns.ivyPatterns.headOption match {
|
||||
case Some(x) => x.startsWith("http:")
|
||||
case _ => false
|
||||
}
|
||||
val art = patterns.artifactPatterns.headOption match {
|
||||
case Some(x) => x.startsWith("http:")
|
||||
case _ => false
|
||||
}
|
||||
if (ivy || art) {
|
||||
warnHttp(patterns.toString)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue