mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-21 15:36:50 -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) => {
|
||||
|
||||
Reference in New Issue
Block a user