mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 10:52:22 +00:00
fix: clarify OCI update dialog and distinguish cancellation
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user