Skip to content

Commit

Permalink
option_parser: Support having "=" inside option values
Browse files Browse the repository at this point in the history
This is particularly helpful as the cloud-init DMI serial number
encoding scheme uses "=" and ";" for key value pairs.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
  • Loading branch information
rbradford authored and Sebastien Boeuf committed Apr 21, 2022
1 parent 4a04d1f commit 6ccf037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion option_parser/src/lib.rs
Expand Up @@ -77,7 +77,7 @@ impl OptionParser {
}

for option in split_commas_outside_brackets(input)?.iter() {
let parts: Vec<&str> = option.split('=').collect();
let parts: Vec<&str> = option.splitn(2, '=').collect();

match self.options.get_mut(parts[0]) {
None => return Err(OptionParserError::UnknownOption(parts[0].to_owned())),
Expand Down

0 comments on commit 6ccf037

Please sign in to comment.