Commit 10c474fa authored by bow's avatar bow
Browse files

Update retrieveCommand function

parent 1de25c35
......@@ -75,13 +75,12 @@ object BiopetExecutable {
System.exit(1)
}
def retrieveCommand(q: String, cl: List[MainCommand]): Option[MainCommand] = {
for (mc <- cl) {
if (q == mc.name.toLowerCase)
return Some(mc)
def retrieveCommand(q: String, cl: List[MainCommand]): Option[MainCommand] =
cl match {
case head :: tail if head.name.toLowerCase == q => Some(head)
case Nil => None
case head :: tail => retrieveCommand(q, tail)
}
None
}
args match {
case Array("pipeline", pipelineName, pipelineArgs @ _*) =>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment