diff --git a/electron/main.ts b/electron/main.ts index b14f0ac..d2c351a 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -397,13 +397,7 @@ let keyService: any if (process.platform === 'darwin') { keyService = new KeyServiceMac() } else if (process.platform === 'linux') { - // const { KeyServiceLinux } = require('./services/keyServiceLinux') - // keyService = new KeyServiceLinux() - - import('./services/keyServiceLinux').then(({ KeyServiceLinux }) => { - keyService = new KeyServiceLinux(); - }); - + keyService = new KeyServiceLinux() } else { keyService = new KeyService() } diff --git a/electron/services/keyServiceLinux.ts b/electron/services/keyServiceLinux.ts index b67a73b..6cc46a5 100644 --- a/electron/services/keyServiceLinux.ts +++ b/electron/services/keyServiceLinux.ts @@ -5,7 +5,7 @@ import { execFile, exec, spawn } from 'child_process' import { promisify } from 'util' import crypto from 'crypto' import { createRequire } from 'module'; -const require = createRequire(import.meta.url); +const require = createRequire(__filename); const execFileAsync = promisify(execFile) const execAsync = promisify(exec)