diff options
author | Paul Phillips <paulp@improving.org> | 2009-03-12 18:45:21 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-03-12 18:45:21 +0000 |
commit | b4e3d06662a6e4b3aa28692f2d0cdfe6f7cd1070 (patch) | |
tree | de3eee2f2bc8ce805f3922cc8df0407d5a96ecfc | |
parent | 8bafc41b19deca3b95877633dd07ffa38c42feec (diff) | |
download | scala-b4e3d06662a6e4b3aa28692f2d0cdfe6f7cd1070.tar.gz scala-b4e3d06662a6e4b3aa28692f2d0cdfe6f7cd1070.tar.bz2 scala-b4e3d06662a6e4b3aa28692f2d0cdfe6f7cd1070.zip |
apparently ant might pass an empty string as an...
apparently ant might pass an empty string as an arg - discard it.
-rw-r--r-- | src/compiler/scala/tools/ant/Scaladoc.scala | 1 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/Settings.scala | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/ant/Scaladoc.scala b/src/compiler/scala/tools/ant/Scaladoc.scala index ebb7414734..51aa33b06e 100644 --- a/src/compiler/scala/tools/ant/Scaladoc.scala +++ b/src/compiler/scala/tools/ant/Scaladoc.scala @@ -574,6 +574,7 @@ class Scaladoc extends MatchingTask { args = docSettings.parseParams(args) if (args0 eq args) error("Parameter '" + args.head + "' is not recognised by Scaladoc.") } + else if (args.head == "") args = args.tail else error("Parameter '" + args.head + "' does not start with '-'.") } diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala index b1d7cddee9..662ecedf1a 100644 --- a/src/compiler/scala/tools/nsc/Settings.scala +++ b/src/compiler/scala/tools/nsc/Settings.scala @@ -117,6 +117,8 @@ class Settings(errorFn: String => Unit) extends ScalacSettings { def doArgs(args: List[String]): List[String] = { if (args.isEmpty) return Nil val p = args.head + if (p == "") return args.tail // it looks like ant passes "" sometimes + if (!p.startsWith("-")) { errorFn("Parameter '" + p + "' does not start with '-'.") return args |