Skip to content

Commit

Permalink
Fix pattern match on buildLoaders.
Browse files Browse the repository at this point in the history
Fixes #1341
  • Loading branch information
jsuereth committed May 16, 2014
1 parent d509ff8 commit e95fecc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main/src/main/scala/sbt/Load.scala
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ object Load
loaders updatePluginManagement PluginManagement.extractOverrides(unit.plugins.fullClasspath)

def addResolvers(unit: sbt.BuildUnit, isRoot: Boolean, loaders: BuildLoader): BuildLoader =
unit.definitions.builds.flatMap(_.buildLoaders) match
unit.definitions.builds.flatMap(_.buildLoaders).toList match
{
case Nil => loaders
case x :: xs =>
Expand Down
12 changes: 12 additions & 0 deletions sbt/src/sbt-test/project/build-loaders/project/build.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sbt._
import Keys._

object EmptyLoaderBuild extends Build {
override def buildLoaders = BuildLoader.transform(_.unit) :: Nil
lazy val root = (
project in file(".")
settings(
name := "foo"
)
)
}
2 changes: 2 additions & 0 deletions sbt/src/sbt-test/project/build-loaders/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Just making sure the build compiles is enough of a test.
> name

0 comments on commit e95fecc

Please sign in to comment.