fix(linux): start Hopper demo sessions headlessly

This commit is contained in:
morluto
2026-07-14 04:58:45 +08:00
parent 08d5b913b0
commit 75818d119e
18 changed files with 816 additions and 169 deletions
+6
View File
@@ -282,9 +282,14 @@ export class HopperRemoteError extends HopperError {
/** The owned Hopper bridge stopped before its client was closed. */
export class HopperProcessError extends HopperError {
readonly _tag = "HopperProcessError";
override readonly userMessage: string | undefined;
constructor(readonly exitCode: number | null) {
super(`Hopper bridge stopped unexpectedly with code ${String(exitCode)}`);
this.userMessage =
exitCode === 78
? "This Hopper demo build or dialog is not supported for unattended Linux analysis. Update REA or use a supported Hopper build."
: undefined;
}
}
@@ -413,6 +418,7 @@ const STATIC_ERROR_CATEGORIES: Readonly<
const userMessage = (error: AnalysisError): string => {
if (error instanceof AnalysisInputError)
return "Analysis input is invalid. Check the arguments and try again.";
if (error.userMessage !== undefined) return error.userMessage;
if (UNREADABLE_OUTPUT_TAGS.has(error._tag))
return "Analysis returned an unreadable result. Retry once; if it continues, run `rea doctor`.";
if (UNSUPPORTED_PROVIDER_TAGS.has(error._tag))