fix(verify): honor an explicit conformance source root (#11943)

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
This commit is contained in:
ShuaixinHuangandShuaixinHuang authored and GitHub committed 2026-11-18 14:56:35 -05:00
1 parent 53977802b3
commit c4f9ead498
2 files changed
+22 -4

No files matched your search

+3 -4
View File
@@ -45,14 +45,13 @@ process.stdout.write(
);
async function resolveSourceRoot(manifestPath, declaredSourceRoot) {
if (declaredSourceRoot !== undefined)
return realpath(resolve(process.cwd(), declaredSourceRoot));
const candidates = [
declaredSourceRoot === undefined
? null
: resolve(process.cwd(), declaredSourceRoot),
resolve(process.cwd(), "tests/conformance"),
resolve(dirname(dirname(dirname(manifestPath))), "tests/conformance"),
resolve(dirname(manifestPath), "../../tests/conformance"),
].filter((candidate) => candidate !== null);
];
for (const candidate of candidates) {
try {
return await realpath(candidate);