diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-01-30 13:58:43 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-01-30 14:30:00 -0400 |
commit | ba887971ccfc8b0e76d6a06253c507b4597ca0dc (patch) | |
tree | bf43a263792834044ff260b6e0bc7722f5263be6 /src | |
parent | a73cdbd50766267c2aa20b607424fd8cd0cf1964 (diff) |
yaml: reportDuplicateDirectories: minor aggregate cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/data/yaml.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js index 10797861..0f7f06f0 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -1023,7 +1023,7 @@ export function reportDuplicateDirectories(wikiData) { const aggregate = openAggregate({message: `Duplicate directories found`}); for (const thingDataProp of deduplicateSpec) { const thingData = wikiData[thingDataProp]; - aggregate.nest({message: `Duplicate directories found in ${colors.green('wikiData.' + thingDataProp)}`}, ({call}) => { + aggregate.nest({message: `Duplicate directories found in ${colors.green('wikiData.' + thingDataProp)}`}, ({push}) => { const directoryPlaces = Object.create(null); const duplicateDirectories = new Set(); @@ -1049,11 +1049,9 @@ export function reportDuplicateDirectories(wikiData) { for (const directory of sortedDuplicateDirectories) { const places = directoryPlaces[directory]; - call(() => { - throw new Error( - `Duplicate directory ${colors.green(directory)}:\n` + - places.map(thing => ` - ` + inspect(thing)).join('\n')); - }); + push(new Error( + `Duplicate directory ${colors.green(directory)}:\n` + + places.map(thing => ` - ` + inspect(thing)).join('\n'))); } }); } |