mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
chore: changeset (#10925)
This commit is contained in:
parent
dd1d937621
commit
a0c77fc716
2 changed files with 7 additions and 1 deletions
5
.changeset/olive-cars-run.md
Normal file
5
.changeset/olive-cars-run.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"@astrojs/db": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes `ASTRO_DATABASE_FILE` not correctly resolving relative paths (e.g. `ASTRO_DATABASE_FILE=./api/database.db`
|
|
@ -139,7 +139,8 @@ export function normalizeDatabaseUrl(envDbUrl: string | undefined, defaultDbUrl:
|
||||||
if (envDbUrl.startsWith('file://')) {
|
if (envDbUrl.startsWith('file://')) {
|
||||||
return envDbUrl;
|
return envDbUrl;
|
||||||
}
|
}
|
||||||
return new URL(envDbUrl, pathToFileURL(process.cwd())).toString();
|
|
||||||
|
return new URL(envDbUrl, pathToFileURL(process.cwd()) + "/").toString();
|
||||||
} else {
|
} else {
|
||||||
// This is going to be a file URL always,
|
// This is going to be a file URL always,
|
||||||
return defaultDbUrl;
|
return defaultDbUrl;
|
||||||
|
|
Loading…
Reference in a new issue