diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/mill/define/Ctx.scala | 2 | ||||
-rw-r--r-- | core/src/mill/main/Resolve.scala | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/src/mill/define/Ctx.scala b/core/src/mill/define/Ctx.scala index 405f45ed..47035f71 100644 --- a/core/src/mill/define/Ctx.scala +++ b/core/src/mill/define/Ctx.scala @@ -30,7 +30,7 @@ case class BasePath(value: Path) case class Segments(value: Segment*){ def ++(other: Seq[Segment]): Segments = Segments(value ++ other:_*) def ++(other: Segments): Segments = Segments(value ++ other.value:_*) - def render = value match { + def render = value.toList match { case Nil => "" case Segment.Label(head) :: rest => val stringSegments = rest.map{ diff --git a/core/src/mill/main/Resolve.scala b/core/src/mill/main/Resolve.scala index fa39e81c..f4eeb8fe 100644 --- a/core/src/mill/main/Resolve.scala +++ b/core/src/mill/main/Resolve.scala @@ -25,7 +25,8 @@ object Resolve { .map(Right(_)) def invokeCommand(target: mill.Module, name: String) = for{ - (cls, entryPoints) <- discover.value.filterKeys(_.isAssignableFrom(target.getClass)) + (cls, entryPoints) <- discover.value + if cls.isAssignableFrom(target.getClass) ep <- entryPoints if ep._2.name == name } yield ammonite.main.Scripts.runMainMethod( |