Skip to content

Commit

Permalink
fix(core): deduplicate locate result
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Mar 25, 2024
1 parent c22456e commit 81bd683
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import detect from 'detect-indent'
import { manager, spawnAsync } from './utils.js'
import kleur from 'kleur'
import { promises as fs, readFileSync } from 'node:fs'
import { Dict, makeArray } from 'cosmokit'
import { deduplicate, Dict, makeArray } from 'cosmokit'

export * from './utils.js'

Expand Down Expand Up @@ -180,7 +180,7 @@ export default class Yakumo extends cordis.Service<Yakumo.Config, Context> {
return filter(this.workspaces[folder], folder)
})
} else {
return name.flatMap((name) => this.locate(name, options))
return deduplicate(name.flatMap((name) => this.locate(name, options)))
}
}

Expand Down

0 comments on commit 81bd683

Please sign in to comment.