mirror of https://github.com/sbt/sbt.git
Fix regression where IOExceptions were not caught on trying to access disk.
Fixes #1632
This commit is contained in:
parent
e96d40ebbd
commit
b9dc9f8f4f
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
package sbt
|
||||
|
||||
import java.io.File
|
||||
import java.io.{ IOException, File }
|
||||
import java.net.URL
|
||||
import scala.xml.{ Text, NodeSeq, Elem, XML }
|
||||
import org.apache.ivy.plugins.resolver.DependencyResolver
|
||||
|
|
@ -312,6 +312,8 @@ object Resolver {
|
|||
} catch {
|
||||
// Occurs inside File constructor when property or environment variable does not exist
|
||||
case _: NullPointerException => None
|
||||
// Occurs when File does not exist
|
||||
case _: IOException => None
|
||||
case e: SAXParseException => System.err.println(s"WARNING: Problem parsing ${f().getAbsolutePath}, ${e.getMessage}"); None
|
||||
}
|
||||
loadHomeFromSettings(() => new File(Path.userHome, ".m2/settings.xml")) orElse
|
||||
|
|
|
|||
Loading…
Reference in New Issue