Skip to content

Commit

Permalink
fix idb_companion detection
Browse files Browse the repository at this point in the history
Summary:
* `idb_companion` is snake case
* `idb_companion --help` exists with non-zero exit code, thus using `which` instead

Reviewed By: LukeDefeo

Differential Revision: D59162166

fbshipit-source-id: 0d4917339a846493735804155af8178a904f15e8
  • Loading branch information
antonk52 authored and facebook-github-bot committed Jun 28, 2024
1 parent 67817cb commit d9258eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions desktop/doctor/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ export function getHealthchecks(
const result = await tryExecuteCommand(
`${settings?.idbPath} --help`,
);
const hasIdbCompanion =
await tryExecuteCommand(`idbCompanion --help`);
if (result.fail) {
const hasIdbInPath = await tryExecuteCommand(`which idb`);

Expand All @@ -205,6 +203,9 @@ export function getHealthchecks(
],
};
}
const hasIdbCompanion = await tryExecuteCommand(
'which idb_companion',
);

return {
hasProblem: true,
Expand Down

0 comments on commit d9258eb

Please sign in to comment.