fix: toggle A all not working (#157)

This commit is contained in:
zernonia 2023-11-10 17:21:46 +08:00 committed by GitHub
parent e26d73416b
commit 9d8035566f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ export const add = new Command()
.name('add')
.description('add a component to your project')
.argument('[components...]', 'the components to add')
.option('-y, --yes', 'skip confirmation prompt.', false)
.option('-y, --yes', 'skip confirmation prompt.', true)
.option('-o, --overwrite', 'overwrite existing files.', false)
.option(
'-c, --cwd <cwd>',
@ -71,7 +71,7 @@ export const add = new Command()
: options.components
if (!options.components?.length && !options.all) {
const { components } = await prompts({
type: 'autocompleteMultiselect',
type: 'multiselect',
name: 'components',
message: 'Which components would you like to add?',
hint: 'Space to select. A to toggle all. Enter to submit.',