git.delta.rocks / jrsonnet / refs/commits / d13b86279a71

difftreelog

fix clap now requires multiple_occurrences

Yaroslav Bolyukin2021-07-06parent: #6745272.patch.diff
in: master

2 files changed

modifiedcrates/jrsonnet-cli/src/ext.rsdiffbeforeafterboth
65 long,
66 short = 'V',
67 name = "name[=var data]",
68 number_of_values = 1,
69 multiple_occurrences = true
70 )]
65 ext_str: Vec<ExtStr>,71 ext_str: Vec<ExtStr>,
66 /// Read string external variable from file.72 /// Read string external variable from file.
67 /// See also `--ext-str`73 /// See also `--ext-str`
68 #[clap(long, name = "name=var path", number_of_values = 1)]74 #[clap(
75 long,
76 name = "name=var path",
77 number_of_values = 1,
78 multiple_occurrences = true
79 )]
69 ext_str_file: Vec<ExtFile>,80 ext_str_file: Vec<ExtFile>,
70 /// Add external variable from code.81 /// Add external variable from code.
71 /// See also `--ext-str`82 /// See also `--ext-str`
72 #[clap(long, name = "name[=var source]", number_of_values = 1)]83 #[clap(
84 long,
85 name = "name[=var source]",
86 number_of_values = 1,
87 multiple_occurrences = true
88 )]
73 ext_code: Vec<ExtStr>,89 ext_code: Vec<ExtStr>,
74 /// Read string external variable from file.90 /// Read string external variable from file.
75 /// See also `--ext-str`91 /// See also `--ext-str`
76 #[clap(long, name = "name=var code path", number_of_values = 1)]92 #[clap(
93 long,
94 name = "name=var code path",
95 number_of_values = 1,
96 multiple_occurrences = true
97 )]
77 ext_code_file: Vec<ExtFile>,98 ext_code_file: Vec<ExtFile>,
78}99}
modifiedcrates/jrsonnet-cli/src/tla.rsdiffbeforeafterboth
--- a/crates/jrsonnet-cli/src/tla.rs
+++ b/crates/jrsonnet-cli/src/tla.rs
@@ -9,19 +9,40 @@
 	/// Top level arguments will be passed to function before manifestification stage.
 	/// This is preferred to ExtVars method.
 	/// If [=data] is not set then it will be read from `name` env variable.
-	#[clap(long, short = 'A', name = "name[=tla data]", number_of_values = 1)]
+	#[clap(
+		long,
+		short = 'A',
+		name = "name[=tla data]",
+		number_of_values = 1,
+		multiple_occurrences = true
+	)]
 	tla_str: Vec<ExtStr>,
 	/// Read top level argument string from file.
 	/// See also `--tla-str`
-	#[clap(long, name = "name=tla path", number_of_values = 1)]
+	#[clap(
+		long,
+		name = "name=tla path",
+		number_of_values = 1,
+		multiple_occurrences = true
+	)]
 	tla_str_file: Vec<ExtFile>,
 	/// Add top level argument from code.
 	/// See also `--tla-str`
-	#[clap(long, name = "name[=tla source]", number_of_values = 1)]
+	#[clap(
+		long,
+		name = "name[=tla source]",
+		number_of_values = 1,
+		multiple_occurrences = true
+	)]
 	tla_code: Vec<ExtStr>,
 	/// Read top level argument code from file.
 	/// See also `--tla-str`
-	#[clap(long, name = "name=tla code path", number_of_values = 1)]
+	#[clap(
+		long,
+		name = "name=tla code path",
+		number_of_values = 1,
+		multiple_occurrences = true
+	)]
 	tla_code_file: Vec<ExtFile>,
 }
 impl ConfigureState for TLAOpts {