mirror of https://github.com/sbt/sbt.git
Fix NPE in FakeResolver
This commit is contained in:
parent
175ece4238
commit
81e350325e
|
|
@ -57,6 +57,7 @@ private[sbt] class FakeResolver(private var name: String, cacheDir: File, module
|
|||
throw new UnsupportedOperationException("This resolver doesn't support publishing.")
|
||||
|
||||
override def download(artifact: ArtifactOrigin, options: DownloadOptions): ArtifactDownloadReport = {
|
||||
|
||||
val report = new ArtifactDownloadReport(artifact.getArtifact)
|
||||
val path = new URL(artifact.getLocation).toURI.getPath
|
||||
val localFile = new File(path)
|
||||
|
|
@ -77,7 +78,7 @@ private[sbt] class FakeResolver(private var name: String, cacheDir: File, module
|
|||
|
||||
artifacts foreach { art =>
|
||||
val artifactOrigin = locate(art)
|
||||
report.addArtifactReport(download(artifactOrigin, options))
|
||||
Option(locate(art)) foreach (o => report.addArtifactReport(download(o, options)))
|
||||
}
|
||||
|
||||
report
|
||||
|
|
|
|||
Loading…
Reference in New Issue