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,6 +1,6 @@
|
||||
import { snapshotEnvironment } from "../process/snapshotEnvironment.js";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { accessSync, constants } from "node:fs";
|
||||
import { accessSync, constants, statSync } from "node:fs";
|
||||
|
||||
import { createAnalysisExecution } from "../application/AnalysisProvider.js";
|
||||
import type {
|
||||
@@ -75,6 +75,9 @@ export class HopperProvider implements AnalysisProviderCandidate {
|
||||
};
|
||||
try {
|
||||
accessSync(this.config.hopperLauncherPath, constants.X_OK);
|
||||
// A searchable directory, such as an .app bundle, also passes X_OK.
|
||||
if (!statSync(this.config.hopperLauncherPath).isFile())
|
||||
throw new TypeError("Hopper launcher is not a regular file");
|
||||
return {
|
||||
status: "available",
|
||||
code: null,
|
||||
|
||||
Reference in New Issue
Block a user