mirror of https://github.com/sbt/sbt.git
Add file existence check for Eugene.
This commit is contained in:
parent
b9dc9f8f4f
commit
c84a5e70c7
|
|
@ -304,11 +304,12 @@ object Resolver {
|
|||
private[this] def mavenLocalDir: File = {
|
||||
def loadHomeFromSettings(f: () => File): Option[File] =
|
||||
try {
|
||||
val file = XML.loadFile(f())
|
||||
(file \ "localRepository").text match {
|
||||
val file = f()
|
||||
if(!file.exists) None
|
||||
else ((XML.loadFile(file) \ "localRepository").text match {
|
||||
case "" => None
|
||||
case e @ _ => Some(new File(e))
|
||||
}
|
||||
})
|
||||
} catch {
|
||||
// Occurs inside File constructor when property or environment variable does not exist
|
||||
case _: NullPointerException => None
|
||||
|
|
|
|||
Loading…
Reference in New Issue