feat(desktop): add OPENCODE_TEST_ONBOARDING env (#25968)

This commit is contained in:
Brendan Allan 2026-05-06 12:30:20 +08:00 committed by GitHub
commit efd8024430
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 7 deletions

View file

@ -1,4 +1,5 @@
import Store from "electron-store"
import { app } from "electron"
import { SETTINGS_STORE } from "./constants"
@ -11,7 +12,12 @@ const cache = new Map<string, Store>()
export function getStore(name = SETTINGS_STORE) {
const cached = cache.get(name)
if (cached) return cached
const next = new Store({ name, fileExtension: "", accessPropertiesByDotNotation: false })
const next = new Store({
name,
cwd: app.getPath("userData"),
fileExtension: "",
accessPropertiesByDotNotation: false,
})
cache.set(name, next)
return next
}