Skip to content

Commit

Permalink
fix: handle single command CLI readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Mar 7, 2024
1 parent 06de15f commit fae4369
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/commands/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,10 @@ Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.
this.HelpClass = await loadHelpClass(config)

let readme = await fs.readFile(readmePath, 'utf8')

let commands = config.commands
.filter((c) => !c.hidden && c.pluginType === 'core')
.filter((c) => (this.flags.aliases ? true : !c.aliases.includes(c.id)))
.map((c) => (c.id === '.' ? {...c, id: ''} : c))
.map((c) => (config.isSingleCommandCLI ? {...c, id: ''} : c))

this.debug('commands:', commands.map((c) => c.id).length)
commands = uniqBy(commands, (c) => c.id)
Expand Down

0 comments on commit fae4369

Please sign in to comment.