Skip to content

Commit 4a367ee

Browse files
Allow choice parameter alternatives equal to or greater than 1
1 parent d302cae commit 4a367ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ts-command-line/src/CommandLineParameter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class CommandLineChoiceParameter extends CommandLineParameter {
209209
constructor(definition: ICommandLineChoiceDefinition) {
210210
super(definition);
211211

212-
if (definition.alternatives.length <= 1) {
212+
if (definition.alternatives.length < 1) {
213213
throw new Error(`When defining a choice parameter, the alternatives list must contain at least one value.`);
214214
}
215215
if (definition.defaultValue && definition.alternatives.indexOf(definition.defaultValue) === -1) {

0 commit comments

Comments
 (0)