mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 11:43:20 +00:00
fix(reference): preserve import cancellation provenance (#9597)
* fix(reference): preserve import cancellation reason * test(reference): cover null cancellation during failed cleanup * test(reference): always release fixture directory
This commit is contained in:
1 parent
e66e92904e
commit
e8d1bbc98b
9 files changed
+149
-31
No files matched your search
@@ -99,7 +99,7 @@ export const prepareRoot = async (
|
||||
readonly rootIdentity: BigIntStats;
|
||||
}>
|
||||
> => {
|
||||
if (isAborted(signal)) return err(cancelled());
|
||||
if (isAborted(signal)) return err(cancelled(signal));
|
||||
try {
|
||||
const metadata = await bigLstat(root);
|
||||
if (metadata.isSymbolicLink() || !metadata.isDirectory())
|
||||
@@ -110,7 +110,7 @@ export const prepareRoot = async (
|
||||
),
|
||||
);
|
||||
const canonicalRoot = await realpath(root);
|
||||
if (isAborted(signal)) return err(cancelled());
|
||||
if (isAborted(signal)) return err(cancelled(signal));
|
||||
const canonicalMetadata = await bigLstat(canonicalRoot);
|
||||
if (!sameFile(metadata, canonicalMetadata))
|
||||
return err(
|
||||
@@ -121,7 +121,7 @@ export const prepareRoot = async (
|
||||
);
|
||||
return ok({ canonicalRoot, rootIdentity: canonicalMetadata });
|
||||
} catch (cause: unknown) {
|
||||
if (isAborted(signal)) return err(cancelled());
|
||||
if (isAborted(signal)) return err(cancelled(signal));
|
||||
const rootFailure = rootFilesystemFailure(
|
||||
cause,
|
||||
"Reference source root could not be resolved",
|
||||
|
||||
Reference in new issue
Block a user