fix(test): make host fixtures portable

This commit is contained in:
morluto
2026-07-16 19:51:25 +08:00
parent b2d1f2affd
commit f23f52903c
11 changed files with 74 additions and 23 deletions
+2
View File
@@ -63,6 +63,8 @@ export interface GhidraJavaObservation {
/** Narrow synchronous seam used by provider discovery without launching Ghidra. */
export interface GhidraInstallationHost {
readonly platform?: NodeJS.Platform;
readonly architecture?: NodeJS.Architecture;
readText(path: string): string | undefined;
executable(path: string): boolean;
probeJava(
+6
View File
@@ -415,6 +415,12 @@ export class GhidraProvider implements AnalysisProviderCandidate {
...(this.config.ghidraJavaHome === undefined
? {}
: { javaHome: this.config.ghidraJavaHome }),
...(this.installationHost?.platform === undefined
? {}
: { platform: this.installationHost.platform }),
...(this.installationHost?.architecture === undefined
? {}
: { architecture: this.installationHost.architecture }),
};
this.#installation ??=
this.installationHost === undefined