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

This commit is contained in:
Vincent Koc
2026-11-26 00:43:43 +08:00
committed by GitHub
parent 0f81637e08
commit e22bc84894
+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,
});