fix(test): make host fixtures portable
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user