diff options
Diffstat (limited to 'src/compiler/scala/tools/cmd/CommandLine.scala')
-rw-r--r-- | src/compiler/scala/tools/cmd/CommandLine.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/cmd/CommandLine.scala b/src/compiler/scala/tools/cmd/CommandLine.scala index e44752eb6e..8d76807d7d 100644 --- a/src/compiler/scala/tools/cmd/CommandLine.scala +++ b/src/compiler/scala/tools/cmd/CommandLine.scala @@ -24,7 +24,7 @@ class CommandLine(val spec: Reference, val originalArgs: List[String]) extends C val Terminator = "--" val ValueForUnaryOption = "true" // so if --opt is given, x(--opt) = true - def mapForUnary(opt: String) = Map(opt -> ValueForUnaryOption) + def mapForUnary(opt: String) = Map(fromOpt(opt) -> ValueForUnaryOption) def errorFn(msg: String) = println(msg) /** argMap is option -> argument (or "" if it is a unary argument) @@ -72,7 +72,7 @@ class CommandLine(val spec: Reference, val originalArgs: List[String]) extends C if (x2 == Terminator) mapForUnary(x1) ++ residual(xs) else if (isUnaryOption(x1)) mapForUnary(x1) ++ loop(args.tail) - else if (isBinaryOption(x1)) Map(x1 -> x2) ++ loop(xs) + else if (isBinaryOption(x1)) Map(fromOpt(x1) -> x2) ++ loop(xs) else if (isUnknown(x1)) loop(args.tail) else residual(List(x1)) ++ loop(args.tail) } |