Skip to content

Commit

Permalink
Merge pull request #2155 from effigies/fix/multiple-inheritable-files…
Browse files Browse the repository at this point in the history
…-error

feat(inheritance): Improve error definition for MULTIPLE_INHERITABLE_FILES
  • Loading branch information
rwblair authored Oct 10, 2024
2 parents c52a671 + a2443cb commit 09222a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bids-validator/src/files/inheritance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ export function* walkBack(
exactMatch.viewed = true
yield exactMatch
} else {
const paths = candidates.map((x) => x.path).sort()
throw {
code: 'MULTIPLE_INHERITABLE_FILES',
location: source.path,
affects: candidates.map((file) => file.path),
location: paths[0],
affects: source.path,
issueMessage: `Candidate files: ${paths}`,
}
}
} else if (candidates.length === 1) {
Expand Down

0 comments on commit 09222a7

Please sign in to comment.