fix: Add back depercated `is_multiple_occurrences_set`
@@ -216,6 +216,19 @@ fn gen_options(cmd: &Command, indent: usize) -> String {
buffer.push_str(&format!("{:indent$}],\n", "", indent = indent + 4));
}
+ #[allow(deprecated)]
+ if matches!(
+ option.get_action(),
+ ArgAction::StoreValue | ArgAction::IncOccurrence
+ ) && option.is_multiple_occurrences_set()
+ {
+ buffer.push_str(&format!(
+ "{:indent$}isRepeatable: true,\n",
+ "",
+ indent = indent + 4
+ ));
+ }
+
if let ArgAction::Set | ArgAction::Append | ArgAction::Count = option.get_action() {
buffer.push_str(&format!(
"{:indent$}isRepeatable: true,\n",
@@ -303,6 +316,19 @@ fn gen_options(cmd: &Command, indent: usize) -> String {
buffer.push_str(&format!("{:indent$}],\n", "", indent = indent + 4));
}
+ #[allow(deprecated)]
+ if matches!(
+ flag.get_action(),
+ ArgAction::StoreValue | ArgAction::IncOccurrence
+ ) && flag.is_multiple_occurrences_set()
+ {
+ buffer.push_str(&format!(
+ "{:indent$}isRepeatable: true,\n",
+ "",
+ indent = indent + 4
+ ));
+ }
+
if let ArgAction::Set | ArgAction::Append | ArgAction::Count = flag.get_action() {
buffer.push_str(&format!(
"{:indent$}isRepeatable: true,\n",
