diff --git a/src/main/scala/higherkindness/rules_scala/workers/zinc/compile/ZincRunner.scala b/src/main/scala/higherkindness/rules_scala/workers/zinc/compile/ZincRunner.scala index c0cf9a75..3a297402 100644 --- a/src/main/scala/higherkindness/rules_scala/workers/zinc/compile/ZincRunner.scala +++ b/src/main/scala/higherkindness/rules_scala/workers/zinc/compile/ZincRunner.scala @@ -58,11 +58,22 @@ object ZincRunner extends WorkerMain[Namespace] { parser.parseArgsOrFail(args.getOrElse(Array.empty)) } + protected[this] def work(worker: Namespace, args: Array[String], out: PrintStream) = { + new ZincRunner(worker, args, out).work() + } +} + +class ZincRunner(worker: Namespace, args: Array[String], out: PrintStream) { + + private[this] def labelToPath(label: String): Path = { + Paths.get(label.replaceAll("^/+", "").replaceAll(raw"[^\w/]", "_")) + } + private def pathFrom(args: Namespace, name: String): Option[Path] = Option(args.getString(name)).map { dir => Paths.get(dir.replace("~", sys.props.getOrElse("user.home", ""))) } - protected[this] def work(worker: Namespace, args: Array[String], out: PrintStream) = { + def work() = { val usePersistence: Boolean = worker.getBoolean("use_persistence") match { case p: java.lang.Boolean => p case null => true