Permalink
Browse files

extra launcher properties paths for missing and unmatched sbt.version

  • Loading branch information...
harrah committed May 28, 2012
1 parent e8fcdc0 commit ba13aec15921709b22dac75bd7c561c318c61a7e
Showing with 4 additions and 2 deletions.
  1. +4 −2 launch/Configuration.scala
@@ -61,6 +61,8 @@ object Configuration
}
def multiPartError[T](firstLine: String, lines: List[T]) = error( (firstLine :: lines).mkString("\n\t") )
+ def UnspecifiedVersionPart = "Unspecified"
+ def DefaultVersionPart = "Default"
def DefaultBuildProperties = "project/build.properties"
def SbtVersionProperty = "sbt.version"
val ConfigurationName = "sbt.boot.properties"
@@ -77,7 +79,7 @@ object Configuration
def fallbackParts: List[String] = "" :: Nil
def versionParts(version: Option[String]): List[String] =
version match {
- case None => fallbackParts
+ case None => UnspecifiedVersionPart :: fallbackParts
case Some(v) => versionParts(v)
}
def versionParts(version: String): List[String] =
@@ -87,7 +89,7 @@ object Configuration
if(m.matches())
subPartsIndices map {_.map(m.group).filter(neNull).mkString(".") }
else
- fallbackParts
+ DefaultVersionPart :: fallbackParts
}
private[this] def subPartsIndices =
(1 :: 2 :: Nil) ::

0 comments on commit ba13aec

Please sign in to comment.