mirror of https://github.com/sbt/sbt.git
Update to last case-app
This commit is contained in:
parent
55d1ec0887
commit
b5529679cf
|
|
@ -34,7 +34,7 @@ case class CommonOptions(
|
||||||
val verbose0 = verbose.length + (if (quiet) 1 else 0)
|
val verbose0 = verbose.length + (if (quiet) 1 else 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
sealed trait Command extends App
|
sealed trait CoursierCommand extends Command
|
||||||
|
|
||||||
case class Fetch(
|
case class Fetch(
|
||||||
@HelpMessage("Fetch source artifacts")
|
@HelpMessage("Fetch source artifacts")
|
||||||
|
|
@ -45,7 +45,7 @@ case class Fetch(
|
||||||
javadoc: Boolean,
|
javadoc: Boolean,
|
||||||
@Recurse
|
@Recurse
|
||||||
common: CommonOptions
|
common: CommonOptions
|
||||||
) extends Command {
|
) extends CoursierCommand {
|
||||||
|
|
||||||
val helper = new Helper(common, remainingArgs)
|
val helper = new Helper(common, remainingArgs)
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ case class Launch(
|
||||||
mainClass: String,
|
mainClass: String,
|
||||||
@Recurse
|
@Recurse
|
||||||
common: CommonOptions
|
common: CommonOptions
|
||||||
) extends Command {
|
) extends CoursierCommand {
|
||||||
|
|
||||||
val (rawDependencies, extraArgs) = {
|
val (rawDependencies, extraArgs) = {
|
||||||
val idxOpt = Some(remainingArgs.indexOf("--")).filter(_ >= 0)
|
val idxOpt = Some(remainingArgs.indexOf("--")).filter(_ >= 0)
|
||||||
|
|
@ -141,7 +141,7 @@ case class Launch(
|
||||||
case class Classpath(
|
case class Classpath(
|
||||||
@Recurse
|
@Recurse
|
||||||
common: CommonOptions
|
common: CommonOptions
|
||||||
) extends Command {
|
) extends CoursierCommand {
|
||||||
|
|
||||||
val helper = new Helper(common, remainingArgs)
|
val helper = new Helper(common, remainingArgs)
|
||||||
|
|
||||||
|
|
@ -165,7 +165,7 @@ case class Repository(
|
||||||
@ExtraName("l")
|
@ExtraName("l")
|
||||||
defaultList: Boolean,
|
defaultList: Boolean,
|
||||||
ivyLike: Boolean
|
ivyLike: Boolean
|
||||||
) extends Command {
|
) extends CoursierCommand {
|
||||||
|
|
||||||
if (add.exists(!_.contains(":"))) {
|
if (add.exists(!_.contains(":"))) {
|
||||||
CaseApp.printUsage[Repository](err = true)
|
CaseApp.printUsage[Repository](err = true)
|
||||||
|
|
@ -238,4 +238,4 @@ case class Repository(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object CoursierApp extends CommandAppOf[Command]
|
object Coursier extends CommandAppOf[CoursierCommand]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue