mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
misc bugfixes for alpha.4 (#2953)
* fix lockup when stop during init * Fix incorrect description for registry package remove command * alpha.5 * beta.25 --------- Co-authored-by: Mariusz Kogen <k0gen@pm.me>
This commit is contained in:
@@ -51,41 +51,3 @@ export function setupOnInit(onInit: InitScriptOrFn): InitScript {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export function setupOnInstall(
|
||||
onInstall: InitScriptOrFn<"install">,
|
||||
): InitScript {
|
||||
return {
|
||||
init: async (effects, kind) => {
|
||||
if (kind === "install") {
|
||||
if ("init" in onInstall) await onInstall.init(effects, kind)
|
||||
else await onInstall(effects, kind)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export function setupOnUpdate(onUpdate: InitScriptOrFn<"update">): InitScript {
|
||||
return {
|
||||
init: async (effects, kind) => {
|
||||
if (kind === "update") {
|
||||
if ("init" in onUpdate) await onUpdate.init(effects, kind)
|
||||
else await onUpdate(effects, kind)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export function setupOnInstallOrUpdate(
|
||||
onInstallOrUpdate: InitScriptOrFn<"install" | "update">,
|
||||
): InitScript {
|
||||
return {
|
||||
init: async (effects, kind) => {
|
||||
if (kind === "install" || kind === "update") {
|
||||
if ("init" in onInstallOrUpdate)
|
||||
await onInstallOrUpdate.init(effects, kind)
|
||||
else await onInstallOrUpdate(effects, kind)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user