Skip to content

Commit 7e68f86

Browse files
committed
fix: set proper path for the parser
1 parent 3240c1c commit 7e68f86

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/background/model/background-app.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ import { DirectiveState } from '../states/directive.state';
2121
import { SymbolIndex, SymbolData } from './symbol-index';
2222
import { StaticSymbol } from '@angular/compiler';
2323
import { menus } from '../app';
24-
import { existsSync } from 'fs';
2524
import { join } from 'path';
2625

27-
const cwd = join(__dirname, '..');
28-
2926
const success = (sender, msg, payload) => {
3027
sender.send(msg, Status.Success, payload);
3128
};
@@ -63,12 +60,7 @@ export class BackgroundApp {
6360
private taskQueue: TaskQueue;
6461

6562
init() {
66-
let script = './app/parser.js';
67-
if (existsSync(join(cwd, 'app.asar'))) {
68-
script = 'app.asar/app/parser.js';
69-
}
70-
71-
this.slaveProcess = SlaveProcess.create(script);
63+
this.slaveProcess = SlaveProcess.create(join(__dirname, 'parser.js'));
7264
this.taskQueue = new TaskQueue();
7365
ipcMain.on(Message.LoadProject, (e, tsconfig: string) => {
7466
if (!this.slaveProcess.connected) {

0 commit comments

Comments
 (0)