From 8a5262d1175e75018ff044ac19ebeb9e0e27a721 Mon Sep 17 00:00:00 2001 From: Johannes Wirth Date: Wed, 1 Oct 2025 18:13:06 +0200 Subject: [PATCH] Fix missing parameters --- .../com/minres/tgc/hammer/options/BaseOption.scala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/toolflow/src/main/scala/com/minres/tgc/hammer/options/BaseOption.scala b/toolflow/src/main/scala/com/minres/tgc/hammer/options/BaseOption.scala index f9efd2b..738ae07 100644 --- a/toolflow/src/main/scala/com/minres/tgc/hammer/options/BaseOption.scala +++ b/toolflow/src/main/scala/com/minres/tgc/hammer/options/BaseOption.scala @@ -8,12 +8,16 @@ import scala.compiletime.uninitialized trait BaseOption[T](using conv: ValueConverter[T]) { protected def createScallop(conf: ScallopConf, group: ScallopOptionGroup): ScallopOption[T] private var scallop: ScallopOption[T] = uninitialized - def init(scallopConf: ScallopConf, group: ScallopOptionGroup): Unit = scallop = createScallop(scallopConf, group) + def init(scallopConf: ScallopConf, group: ScallopOptionGroup): Unit = { + scallop = createScallop(scallopConf, group) + } - def get: T = scallop() + def get: T = { + scallop() + } def apply: T = get - def getToolParameters: Seq[Shellable] = Seq(s"--$toolName", getToolArg) + def getToolParameters: Seq[Shellable] = if (scallop.isDefined) Seq(s"--$toolName", getToolArg) else Seq() def toolName: String def getToolArg: String = get.toString