mirror of
https://github.com/morluto/rea
synced 2026-10-26 14:25:49 -04:00
dcfc5d403a
Thread the existing resource scope through skill and client configuration reads. Keep failed-close handles owned, wait for admitted reads, and surface unresolved cleanup alongside doctor, uninstall and update results. Validated focused setup/doctor/update and filesystem boundary checks, temporary-file hygiene, packaged setup/update/uninstall workflows, and static checks. No external provider installation was performed.
21 lines
565 B
TypeScript
21 lines
565 B
TypeScript
import type { UpdateResult } from "./Update.js";
|
|
|
|
/** Whether the update command left the requested release unapplied. */
|
|
export const isUpdateFailure = (result: UpdateResult): boolean => {
|
|
if (result.cleanupFailure !== undefined) return true;
|
|
const status = result.status;
|
|
switch (status) {
|
|
case "current":
|
|
case "updated":
|
|
return false;
|
|
case "failed":
|
|
return true;
|
|
default: {
|
|
const exhaustive: never = status;
|
|
throw new TypeError(
|
|
`Unhandled update result status: ${String(exhaustive)}`,
|
|
);
|
|
}
|
|
}
|
|
};
|