We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d302cae commit 4a367eeCopy full SHA for 4a367ee
libraries/ts-command-line/src/CommandLineParameter.ts
@@ -209,7 +209,7 @@ export class CommandLineChoiceParameter extends CommandLineParameter {
209
constructor(definition: ICommandLineChoiceDefinition) {
210
super(definition);
211
212
- if (definition.alternatives.length <= 1) {
+ if (definition.alternatives.length < 1) {
213
throw new Error(`When defining a choice parameter, the alternatives list must contain at least one value.`);
214
}
215
if (definition.defaultValue && definition.alternatives.indexOf(definition.defaultValue) === -1) {
0 commit comments