Skip to content

Commit

Permalink
fix two task groupings in wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
locksten committed Apr 9, 2024
1 parent 5e0d1f9 commit b218121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/tasks/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const groupingWizard = async (tasks: RnvTask[]) => {
const optionsMap: Record<string, { name: string; value: RnvTask[] }> = {};
filteredTasks.forEach((taskInstance) => {
const prefix = taskInstance.task.split(' ')[0];
const sharesPrefix = filteredTasks.filter((t) => t.task.split(' ')[0] === prefix).length > 2;
const sharesPrefix = filteredTasks.filter((t) => t.task.split(' ')[0] === prefix).length > 1;
if (sharesPrefix) {
optionsMap[prefix] = {
name: `${prefix}${chalk().gray('...')}`,
Expand Down Expand Up @@ -121,7 +121,7 @@ const disambiguatingWizard = async (tasks: RnvTask[]) => {
source: async (_, input) =>
options.filter((o) => o.name.toLowerCase().includes(input?.toLowerCase() ?? '')),
name: 'selected',
message: `Pick a subcommand`,
message: `Pick a command`,
loop: false,
choices: options,
pageSize: 15,
Expand Down

0 comments on commit b218121

Please sign in to comment.