File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
modules/cli/src/main/scala/scala/cli/commands/export0 Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -155,11 +155,15 @@ object Export extends ScalaCommand[ExportOptions] {
155155 val shouldExportToSbt = options.sbt.getOrElse(false )
156156 val shouldExportToMaven = options.maven.getOrElse(false )
157157
158- val exportOptions = List (shouldExportToMill, shouldExportToSbt, shouldExportToMaven)
159-
160- if (exportOptions.count(identity) > 1 ) {
158+ val exportOptions =
159+ (if shouldExportToMill then List (" Mill" ) else Nil ) ++
160+ (if shouldExportToSbt then List (" SBT" ) else Nil ) ++
161+ (if shouldExportToMaven then List (" Maven" ) else Nil )
162+ val exportOptionsString = exportOptions.mkString(" , " )
163+ if exportOptions.length > 1 then {
161164 logger.error(
162- s " Error: Cannot export to both mill and sbt. Please pick one build tool to export. "
165+ s """ Error: Cannot export to more than one tool at once (currently chosen: $exportOptionsString).
166+ |Pick one build tool to export to. """ .stripMargin
163167 )
164168 sys.exit(1 )
165169 }
You can’t perform that action at this time.
0 commit comments