mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-05 16:04:43 +00:00
fix(usage): find Go logins in the configured data directory
Resolve relative database overrides against the OpenCode data directory so usage discovery follows the same store as the CLI. Co-authored-by: Ivan Pantic <panta@talentkit.io>
This commit is contained in:
co-authored by
Ivan Pantic
parent
0ac8175015
commit
02168446fb
@@ -28,7 +28,7 @@ const keySchema = z.object({ type: z.literal("key"), key: z.string().min(1) });
|
||||
export function defaultStorePaths(env: NodeJS.ProcessEnv = process.env): StorePaths {
|
||||
const dataHome = env.XDG_DATA_HOME || join(env.HOME || homedir(), ".local", "share");
|
||||
const directory = join(dataHome, "opencode");
|
||||
const database = env.OPENCODE_DB ? resolve(env.OPENCODE_DB) : join(directory, "opencode.db");
|
||||
const database = resolve(directory, env.OPENCODE_DB || "opencode.db");
|
||||
return { file: join(directory, "auth.json"), database };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user