Skip to content

Commit 09222a7

Browse files
authored
Merge pull request #2155 from effigies/fix/multiple-inheritable-files-error
feat(inheritance): Improve error definition for MULTIPLE_INHERITABLE_FILES
2 parents c52a671 + a2443cb commit 09222a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bids-validator/src/files/inheritance.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ export function* walkBack(
3333
exactMatch.viewed = true
3434
yield exactMatch
3535
} else {
36+
const paths = candidates.map((x) => x.path).sort()
3637
throw {
3738
code: 'MULTIPLE_INHERITABLE_FILES',
38-
location: source.path,
39-
affects: candidates.map((file) => file.path),
39+
location: paths[0],
40+
affects: source.path,
41+
issueMessage: `Candidate files: ${paths}`,
4042
}
4143
}
4244
} else if (candidates.length === 1) {

0 commit comments

Comments
 (0)