File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/compiler/scala/tools/nsc/settings Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ class MutableSettings(val errorFn: String => Unit)
5353 errorFn(" bad option: '" + x + " '" )
5454 (false , args)
5555 }
56+ // discard empties, sometimes they appear because of ant or etc.
57+ // but discard carefully, because an empty string is valid as an argument
58+ // to an option, e.g. -cp "" . So we discard them only when they appear
59+ // in option position.
60+ else if (x == " " ) {
61+ loop(xs, residualArgs)
62+ }
5663 else lookupSetting(x) match {
5764 case Some (s) if s.shouldStopProcessing => (checkDependencies, newArgs)
5865 case _ => loop(newArgs, residualArgs)
@@ -63,7 +70,7 @@ class MutableSettings(val errorFn: String => Unit)
6370 else (checkDependencies, args)
6471 }
6572 }
66- loop(arguments filterNot (_ == " " ) , Nil )
73+ loop(arguments, Nil )
6774 }
6875 def processArgumentString (params : String ) = processArguments(splitParams(params), true )
6976
You can’t perform that action at this time.
0 commit comments