summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/skaldpress/parseopts.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/skaldpress/parseopts.rs b/src/skaldpress/parseopts.rs
index a0944a8..25d41fb 100644
--- a/src/skaldpress/parseopts.rs
+++ b/src/skaldpress/parseopts.rs
@@ -162,8 +162,15 @@ pub fn parseopt(opts: &mut OptsBuilder, arg: &str, value: Option<String>, progna
parseopts_panic!(progname);
};
let parts: Vec<&str> = meta.split("=").collect();
- opts.metadata
- .insert(String::from(parts[0]), str_to_yaml_value(parts[1]));
+ let val = parts[1];
+ if val.contains(",") {
+ let val_parts: Vec<String> = val.split(",").map(str::to_string).collect();
+ opts.metadata
+ .insert(String::from(parts[0]), YamlValue::List(val_parts));
+ } else {
+ opts.metadata
+ .insert(String::from(parts[0]), str_to_yaml_value(parts[1]));
+ }
}
"help" => {
parseopts_panic!(progname);