fix(hopper): treat a directory launcher path as missing (#1426)
`HOPPER_LAUNCHER_PATH` availability was decided by an `X_OK` access check alone, which a searchable directory also passes. Pointing it at the `Hopper Disassembler.app` bundle instead of its launcher made `rea providers` report Hopper as available and `rea doctor` report it healthy, while analysis then failed with an unrelated `version_unresolved` rejection. Require a regular file in both the provider availability probe and the doctor executable probe, matching the Ghidra launcher check. A directory now reports `executable_missing`, and doctor reports `config_drift` with its existing HOPPER_LAUNCHER_PATH remediation. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
944981d8d5
commit
afdaf98117
@@ -1,5 +1,5 @@
|
||||
import { constants } from "node:fs";
|
||||
import { access, readdir } from "node:fs/promises";
|
||||
import { access, readdir, stat } from "node:fs/promises";
|
||||
import { homeDirectoryFromEnvironment } from "../config/homeDirectory.js";
|
||||
import { join } from "node:path";
|
||||
|
||||
@@ -472,6 +472,7 @@ const executableAvailable = async (
|
||||
): Promise<boolean> => {
|
||||
try {
|
||||
await access(path, constants.X_OK);
|
||||
if (!(await stat(path)).isFile()) return false;
|
||||
if (platform !== "linux") return true;
|
||||
const linked = await run("ldd", [path], options);
|
||||
return linuxSharedLibrariesAvailable(`${linked.stdout}\n${linked.stderr}`);
|
||||
|
||||
Reference in New Issue
Block a user