mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
fix(verify): honor an explicit conformance source root (#11943)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
This commit is contained in:
1 parent
53977802b3
commit
c4f9ead498
2 files changed
+22
-4
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user