Skip to content

Commit

Permalink
Fix regression in CaseApp (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault authored Jun 24, 2020
1 parent 95fe045 commit 6cf9bad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/shared/src/main/scala/caseapp/core/app/CaseApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ abstract class CaseApp[T](implicit val parser0: Parser[T], val messages: Help[T]
Formatter.DefaultNameFormatter

def main(args: Array[String]): Unit =
parser.withHelp.detailedParse(args) match {
parser.withHelp.detailedParse(expandArgs(args.toList), stopAtFirstUnrecognized) match {
case Left(err) => error(err)
case Right((WithHelp(true, _, _), _)) => usageAsked()
case Right((WithHelp(_, true, _), _)) => helpAsked()
case Right((WithHelp(true, _, _), _)) => usageAsked()
case Right((WithHelp(_, _, Left(err)), _)) => error(err)
case Right((WithHelp(_, _, Right(t)), remainingArgs)) => run(_, remainingArgs)
case Right((WithHelp(_, _, Right(t)), remainingArgs)) => run(t, remainingArgs)
}
}

Expand Down

0 comments on commit 6cf9bad

Please sign in to comment.