Skip to content

Commit

Permalink
fix: explicit aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Feb 12, 2024
1 parent 58dc88b commit 2d1e018
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/config/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,14 @@ export class Plugin implements IPlugin {
await Promise.all(
this.commandIDs.map(async (id) => {
try {
const cached = await cacheCommand(await this.findCommand(id, {must: true}), this, respectNoCacheDefault)
const found = await this.findCommand(id, {must: true})
const cached = await cacheCommand(found, this, respectNoCacheDefault)

// Ensure that id is set to the id being processed
// This is necessary because the id is set by findCommand but if there
// are multiple instances of a Command, then the id will be set to the
// last one found.
cached.id = id
if (this.flexibleTaxonomy) {
const permutations = getCommandIdPermutations(id)
const aliasPermutations = cached.aliases.flatMap((a) => getCommandIdPermutations(a))
Expand Down

0 comments on commit 2d1e018

Please sign in to comment.