This commit is contained in:
Dax Raad
2025-06-03 13:00:27 -04:00
parent e5b06a2d95
commit ec7ab16ce4
3 changed files with 15 additions and 1 deletions

View File

@@ -34,7 +34,9 @@ export namespace App {
const data = path.join(Global.data(), git ?? "global")
await Bun.write(path.join(data, "version"), input.version)
const stateFile = Bun.file(path.join(data, "state"))
const state = ((await stateFile.exists()) ? stateFile.json() : {}) as {
const state = (
(await stateFile.exists()) ? await stateFile.json() : {}
) as {
initialized: number
version: string
}