From ba887971ccfc8b0e76d6a06253c507b4597ca0dc Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 30 Jan 2024 13:58:43 -0400 Subject: yaml: reportDuplicateDirectories: minor aggregate cleanup --- src/data/yaml.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/data') 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'))); } }); } -- cgit 1.3.0-6-gf8a5