fix: clarify OCI update dialog and distinguish cancellation

This commit is contained in:
VAIO73
2026-10-21 07:04:41 +00:00
parent 43041846eb
commit 7213fb2553
13 changed files with 357 additions and 24 deletions
+14
View File
@@ -0,0 +1,14 @@
// Native OCI `manage` reserves this code for an explicitly declined update.
export const OCI_CANCELLED_EXIT_CODE = 6
export function scriptCompletion(exitCode: number, cancelledExitCode?: number) {
if (exitCode === 0) return { kind: "success", color: "32" } as const
if (cancelledExitCode !== undefined && exitCode === cancelledExitCode) {
return { kind: "cancelled", color: "36" } as const
}
return { kind: "error", color: "31" } as const
}
export function shouldRefreshOciAfterCompletion(exitCode?: number) {
return exitCode !== OCI_CANCELLED_EXIT_CODE
}