Remove use of __dirname from main process

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-03-27 13:42:15 -05:00
committed by GitHub
parent 1e1f17a36b
commit cbe7b9bd1a
39 changed files with 222 additions and 337 deletions

View File

@@ -8,6 +8,7 @@ import { app } from 'electron';
import { strictAssert } from '../util/assert.std.js';
import { explodePromise } from '../util/explodePromise.std.js';
import { getAppRootDir } from '../util/appRootDir.main.js';
import type { LoggerType } from '../types/Logging.std.js';
import * as Errors from '../types/errors.std.js';
import { SqliteErrorKind } from './errors.std.js';
@@ -551,12 +552,7 @@ export class MainSQL {
}
#createWorker(): CreateWorkerResultType {
const scriptPath = join(
app.getAppPath(),
'ts',
'sql',
'mainWorker.node.js'
);
const scriptPath = join(getAppRootDir(), 'ts', 'sql', 'mainWorker.node.js');
const worker = new Worker(scriptPath);