Skip to content

Commit

Permalink
Merge pull request #338 from LindirQuenya/fix/no-mac-escape
Browse files Browse the repository at this point in the history
Get rid of confusing and annoying exec()
  • Loading branch information
colin969 authored May 27, 2022
2 parents 4ce8448 + 2da650b commit c42e053
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/back/ManagedChildProcess.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IBackProcessInfo, INamedBackProcessInfo, ProcessState } from '@shared/interfaces';
import { ILogPreEntry } from '@shared/Log/interface';
import { Coerce } from '@shared/utils/Coerce';
import { ChildProcess, exec, execFile, spawn } from 'child_process';
import { ChildProcess, execFile, spawn } from 'child_process';
import { EventEmitter } from 'events';
import * as flashpoint from 'flashpoint-launcher';
import { readFileSync } from 'fs';
Expand Down Expand Up @@ -131,10 +131,8 @@ export class ManagedChildProcess extends EventEmitter {
}
}
this.env.PATH = pathArr.join(':');
this.process = exec(this.info.filename + ' "' + this.info.arguments.join('" "') + '"', { cwd: this.cwd, env: this.env});
} else {
this.process = spawn(this.info.filename, this.info.arguments, { cwd: this.cwd, detached: this.detached, shell: this.shell , env: this.env});
}
this.process = spawn(this.info.filename, this.info.arguments, { cwd: this.cwd, detached: this.detached, shell: this.shell , env: this.env});
}
// Set start timestamp
this.startTime = Date.now();
Expand Down

0 comments on commit c42e053

Please sign in to comment.