Skip to content

Commit

Permalink
fix(client-electron): handle stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
marcincichocki committed Aug 4, 2021
1 parent 56cbfc1 commit 568c7f3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/electron/worker/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,13 @@ export class BreachProtocolWorker {

/** NOTE: This will only work on linux. */
private isInstalled(bin: string) {
const command = `command -v ${bin}`;
const output = execSync(command, { encoding: 'utf-8' }).trim();
try {
execSync(`command -v ${bin}`);
} catch (e) {
return false;
}

return !!output;
return true;
}

async dispose() {
Expand Down

0 comments on commit 568c7f3

Please sign in to comment.