Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
ChryseApp: remove addBoardOption.
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed May 29, 2024
1 parent 55b5b9b commit f39ee8b
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/main/scala/ee/hrzn/chryse/ChryseApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ abstract class ChryseApp {
targetPlatforms.map(_.id),
name = "board",
argName = "board",
descr = s"Board to build for.", // XXX (Scallop): It appends " Choices: …". Kinda ugly.
descr = s"Board to build for.", // + " Choices: ..."
required = true,
),
)
Expand Down Expand Up @@ -174,23 +174,8 @@ abstract class ChryseApp {

abstract class ChryseSubcommand(
commandName: String,
addBoardOption: Boolean = false,
commandAliases: Seq[String] = Seq(),
) extends Subcommand((commandName +: commandAliases): _*) {
// TODO: deduplicate board option with the one in build!
val board =
if (addBoardOption && targetPlatforms.length > 1)
Some(
choice(
targetPlatforms.map(_.id),
name = "board",
argName = "board",
descr = s"Board to build for.",
required = true,
),
)
else None

def execute(): Unit
}
}
Expand Down

0 comments on commit f39ee8b

Please sign in to comment.