Skip to content

flag.default values validation is faulty #239

@istandre

Description

@istandre

Their is an issue in the validation of the default values .

Example:

meow({
	importMeta,
	flags: {
		string: {
			type: 'string',
			choices: ['dog', 'cat', 'unicorn'],
			default: 'unicorn',
		},
	},
});

should not throw an error, since 'unicorn' exists within the option choices.

But instead, it throws the following error:

Each value of the option `default` must exist within the option `choices`. Invalid flags: `--string`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions