fix(artifacts): retain output ownership through publication failures

This commit is contained in:
morluto
2026-10-11 05:17:10 +08:00
parent e0e49e9dd5
commit 3f8c51e9b5
12 changed files with 725 additions and 175 deletions
-14
View File
@@ -71,20 +71,6 @@ export const assertFilePathIdentity = async (
);
};
export const pathHasIdentity = async (
path: string,
expected: DirectoryIdentity,
): Promise<boolean> => {
try {
await assertPathIdentity(path, expected);
return true;
} catch (cause: unknown) {
if (isNotFound(cause) || cause instanceof ArtifactReaderFailure)
return false;
throw cause;
}
};
export const isAbsent = async (path: string): Promise<boolean> =>
lstat(path).then(
() => false,