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,3 +1,5 @@
|
||||
import { dirname } from "node:path";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { parseConfig } from "../config/parseConfig.js";
|
||||
@@ -30,6 +32,19 @@ describe("Hopper provider discovery", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("reports a directory launcher path as missing", () => {
|
||||
const directory = dirname(process.execPath);
|
||||
expect(provider(directory).inspectAvailability()).toEqual({
|
||||
status: "unavailable",
|
||||
code: "executable_missing",
|
||||
reason: `Hopper launcher is missing or not executable: ${directory}`,
|
||||
diagnostics: {
|
||||
launcher_path: directory,
|
||||
platform: process.platform,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("separates target kind, format, and architecture support", () => {
|
||||
const hopper = provider(process.execPath);
|
||||
expect(hopper.inspectTargetSupport(databaseTarget())).toMatchObject({
|
||||
|
||||
Reference in New Issue
Block a user