refactor(ghidra): share the executable file probe (#14573)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-11-25 16:43:43 +00:00
1 parent 0f81637e08
commit e22bc84894
1 file changed
+1 -10
+1 -10
View File
@@ -1134,16 +1134,7 @@ export const systemGhidraInstallationHost = (): GhidraInstallationHost => ({
}
},
executableHeader: readGhidraExecutableHeader,
executable(path) {
try {
accessSync(path, constants.X_OK);
return statSync(path).isFile();
} catch (cause: unknown) {
// best-effort cleanup: optional executable probing; failure means missing.
void cause;
return false;
}
},
executable: executablePath,
probeJava: probeGhidraJava,
discoverInstallDirOnPath: discoverGhidraInstallationOnPath,
});