Skip to content

Commit

Permalink
Merge pull request #138 from retronym/topic/blind
Browse files Browse the repository at this point in the history
Fix default value of --direction in CLI
  • Loading branch information
SethTisue committed Nov 16, 2016
2 parents f25b60d + 1cb6472 commit 0da3b46
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ class Main(args: List[String]) extends {

def run(): Int = {
val mima = makeMima
val backwardProblems = (direction getOrElse Nil) match {
val effectiveDirection = direction.getOrElse("backwards")
val backwardProblems = effectiveDirection match {
case "backward" | "backwards" | "both" => mima.collectProblems(prevfile, currentfile)
case _ => Nil
}
val forwardProblems = (direction getOrElse Nil) match {
val forwardProblems = effectiveDirection match {
case "forward" | "forwards" | "both" => mima.collectProblems(currentfile, prevfile)
case _ => Nil
}
Expand Down

0 comments on commit 0da3b46

Please sign in to comment.