aboutsummaryrefslogtreecommitdiff
path: root/stage2/BasicBuild.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-03-19 19:52:56 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2017-03-19 21:57:55 -0400
commit5388bb116834196e1b0a9bd9f2622f36e842b3be (patch)
tree468ba146c0417cca2b12d1924bcf84cabffc3646 /stage2/BasicBuild.scala
parentbb409cc1701b83a3335902789cb4309b64d4e26e (diff)
downloadcbt-5388bb116834196e1b0a9bd9f2622f36e842b3be.tar.gz
cbt-5388bb116834196e1b0a9bd9f2622f36e842b3be.tar.bz2
cbt-5388bb116834196e1b0a9bd9f2622f36e842b3be.zip
better error than NullPointerException when directory does not exist
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r--stage2/BasicBuild.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index 491cdba..fcda629 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -96,7 +96,7 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep
def sources: Seq[File] = (
Seq(defaultSourceDirectory)
++ generatedSources
- ++ projectDirectory.listFiles.toVector.filter(sourceFileFilter)
+ ++ projectDirectory.listOrFail.toVector.filter(sourceFileFilter)
)
/** Which file endings to consider being source files. */
@@ -130,7 +130,7 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep
def localJars: Seq[File] =
Seq(projectDirectory ++ "/lib")
.filter(_.exists)
- .flatMap(_.listFiles)
+ .flatMap(_.listOrFail)
.filter(_.toString.endsWith(".jar"))
override def dependencyClasspath : ClassPath = super.dependencyClasspath