Skip to content

Commit

Permalink
error exit code on wrong command line usage
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg committed Jun 17, 2022
1 parent d39d3e3 commit 8764394
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bleep-cli/src/main/scala/bleep/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ object Main {

def run(logger: Logger, opts: Opts[BleepCommand], restArgs: List[String]): Unit =
Command("bleep", "Bleeping fast build!")(opts).parse(restArgs, sys.env) match {
case Left(help) => System.err.println(help)
case Left(help) =>
System.err.println(help)
System.exit(1)
case Right(cmd) =>
Try(cmd.run()) match {
case Failure(th) => fatal("command failed", logger, th)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class BspClientDisplayProgress(
Str.join(List(renderBuildTarget(buildTargetId), ": ", percentage))
}
.mkString("Compiling ", ", ", (if (rest.isEmpty) "" else s" +${rest.size}"))

// avoid duplicate lines. very visible on web-based terminals which don't erase lines
if (lastProgress.contains(progress)) ()
else {
Expand Down

0 comments on commit 8764394

Please sign in to comment.