Skip to content

Commit

Permalink
fixed issue where KEY=VALUE operator options were dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
sllynn committed Nov 27, 2024
1 parent f0ff785 commit da10dc5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ object OperatorOptions {
val preservedMultipleFlags = scala.collection.mutable.ListBuffer[String]()

val flagRegex = """^-[a-zA-Z]""".r
val keyValueRegex = """^[^=\s]+=[^=\s]+$""".r

// Process the arguments
var i = 0
Expand All @@ -46,6 +47,8 @@ object OperatorOptions {
seenFlags(flag) = values.toList
}
i += values.length // Skip over the values
} else if (keyValueRegex.findFirstIn(flag).isDefined) {
preservedMultipleFlags += flag // Allow duplicates for these
}
i += 1 // Move to the next flag
}
Expand Down

0 comments on commit da10dc5

Please sign in to comment.