File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -175,10 +175,12 @@ class GenerateCommand extends Command<int> {
175
175
176
176
/// Checks if all the required arguments are given, throws otherwise
177
177
for (final variable in config.variables) {
178
- bool matcher (ArgumentVariable v) => v.name == variable.name;
178
+ bool nameMatcher (ArgumentVariable v) => v.name == variable.name;
179
+ bool nonNullNameMatcher (ArgumentVariable v) =>
180
+ nameMatcher (v) && v.value != null ;
179
181
180
182
var argVariable = argumentVariables.firstWhere (
181
- matcher ,
183
+ nonNullNameMatcher ,
182
184
orElse: () => ArgumentVariable (
183
185
name: variable.name,
184
186
value: PlatformExtension .getEnvValue (variable.name),
@@ -222,7 +224,7 @@ class GenerateCommand extends Command<int> {
222
224
}
223
225
224
226
argumentVariables
225
- ..removeWhere (matcher )
227
+ ..removeWhere (nameMatcher )
226
228
..add (argVariable);
227
229
}
228
230
You can’t perform that action at this time.
0 commit comments