Skip to content

Commit b78b276

Browse files
committed
fix(opencode): hardcoded absolute path in drizzle.config.ts datab
The SQLite database configuration contains a hardcoded absolute path '/home/thdxr/.local/share/opencode/opencode.db' pointing to a specific user's home directory. This will cause failures on any other machine and may leak a developer's username. The path should be configurable via environment variable or derived from a standard location like XDG directories. Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
1 parent faf0b61 commit b78b276

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import path from "path"
12
import { defineConfig } from "drizzle-kit"
23

34
export default defineConfig({
45
dialect: "sqlite",
56
schema: "./src/**/*.sql.ts",
67
out: "./migration",
78
dbCredentials: {
8-
url: "/home/thdxr/.local/share/opencode/opencode.db",
9+
url: process.env.OPENCODE_DB_URL || path.join(os.homedir(), ".local", "share", "opencode", "opencode.db"),
910
},
1011
})

0 commit comments

Comments
 (0)