From a68372fd5212a507743db0611b1b27fb24635f26 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Mon, 24 Jul 2017 22:23:37 -0400 Subject: [PATCH] Fix new command This was caused by bad porting of lm API usage. Fixes #3355 --- main/src/main/scala/sbt/TemplateCommand.scala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main/src/main/scala/sbt/TemplateCommand.scala b/main/src/main/scala/sbt/TemplateCommand.scala index 6db29f037..7d12acd66 100644 --- a/main/src/main/scala/sbt/TemplateCommand.scala +++ b/main/src/main/scala/sbt/TemplateCommand.scala @@ -114,11 +114,9 @@ private[sbt] object TemplateCommandUtil { if (!(info.module.revision endsWith "-SNAPSHOT") && jars.nonEmpty) jars.toList else { IO.createDirectory(templateDirectory) - val m = lm.moduleDescriptor(info.module.withConfigurations(Some("component")), - Vector.empty, - scalaModuleInfo) + val m = lm.wrapDependencyInModule(info.module, scalaModuleInfo) val xs = lm.retrieve(m, templateDirectory, log) match { - case Left(_) => ??? // FIXME + case Left(_) => sys.error(s"Retrieval of ${info.module} failed.") case Right(files) => files.toList } xs