mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 06:03:01 -05:00
🐛 Fix file path on windows (#7076)
* fix file path on windows * file path in migrations * release notes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { readdir } from 'node:fs/promises';
|
||||
import path, { dirname } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { fileURLToPath, pathToFileURL } from 'node:url';
|
||||
|
||||
import { load } from 'migrate';
|
||||
|
||||
@@ -30,7 +30,9 @@ export async function run(direction: 'up' | 'down' = 'up'): Promise<void> {
|
||||
for (const f of files
|
||||
.filter(f => f.endsWith('.js') || f.endsWith('.ts'))
|
||||
.sort()) {
|
||||
migrationsModules[f] = await import(path.join(migrationsDir, f));
|
||||
migrationsModules[f] = await import(
|
||||
pathToFileURL(path.join(migrationsDir, f)).href
|
||||
);
|
||||
}
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
|
||||
6
upcoming-release-notes/7076.md
Normal file
6
upcoming-release-notes/7076.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [MikesGlitch]
|
||||
---
|
||||
|
||||
Fix server migrations when running on Windows
|
||||
Reference in New Issue
Block a user