Skip to content

Commit 33d3ad7

Browse files
authored
Merge pull request #3241 from scala-steward-org/topic/fail-on-vcs-options
Fail on `--vcs-*` options
2 parents bd735d9 + b7ef418 commit 33d3ad7

File tree

1 file changed

+3
-3
lines changed
  • modules/core/src/main/scala/org/scalasteward/core/application

1 file changed

+3
-3
lines changed

modules/core/src/main/scala/org/scalasteward/core/application/Cli.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ object Cli {
107107
"vcs-type",
108108
s"deprecated in favor of --${name.forgeType}",
109109
visibility = Visibility.Partial
110-
)
110+
).validate(s"--vcs-type is deprecated; use --${name.forgeType} instead")(_ => false)
111111

112112
private val forgeType = {
113113
val help = ForgeType.all.map(_.asString).mkString("One of ", ", ", "") +
@@ -120,7 +120,7 @@ object Cli {
120120
"vcs-api-host",
121121
s"deprecated in favor of --${name.forgeApiHost}",
122122
visibility = Visibility.Partial
123-
)
123+
).validate(s"--vcs-api-host is deprecated; use --${name.forgeApiHost} instead")(_ => false)
124124

125125
private val forgeApiHost: Opts[Uri] =
126126
option[Uri](name.forgeApiHost, s"API URL of the forge; default: ${GitHub.publicApiBaseUrl}")
@@ -132,7 +132,7 @@ object Cli {
132132
"vcs-login",
133133
s"deprecated in favor of --${name.forgeLogin}",
134134
visibility = Visibility.Partial
135-
)
135+
).validate(s"--vcs-login is deprecated; use --${name.forgeLogin} instead")(_ => false)
136136

137137
private val forgeLogin: Opts[String] =
138138
option[String](name.forgeLogin, "The user name for the forge").orElse(vcsLogin)

0 commit comments

Comments
 (0)