Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

fix(native): name the plist selection that works when Info.plist is missing

Kaoru0822a6fdf426bd98
diff --git a/src/native/NativeMacOSProvider.ts b/src/native/NativeMacOSProvider.ts
index c358f2d2c..a0b499f19 100644
--- a/src/native/NativeMacOSProvider.ts
+++ b/src/native/NativeMacOSProvider.ts
@@ -819,11 +819,14 @@ const unreadablePlist = (
reason: string,
): AnalysisError => {
const sentence = reason.endsWith(".") ? reason : `${reason}.`;
+ // Name the default that is missing and the selection that still works.
+ const missingDefault = `The target has no readable Contents/Info.plist at ${path}: ${sentence} Pass path to inspect another plist.`;
return requested === undefined
? new AnalysisCapabilityUnavailableError(
IDENTITY.id,
"inspect_plist",
- `The target has no readable Contents/Info.plist at ${path}: ${sentence} Pass path to inspect another plist.`,
+ missingDefault,
+ { userMessage: missingDefault },
)
: new AnalysisInputError("inspect_plist", undefined, [
{
diff --git a/tests/boundary/cli/nativePlistSelectionFailureCli.test.ts b/tests/boundary/cli/nativePlistSelectionFailureCli.test.ts
index df3733d51..642f1011e 100644
--- a/tests/boundary/cli/nativePlistSelectionFailureCli.test.ts
+++ b/tests/boundary/cli/nativePlistSelectionFailureCli.test.ts
@@ -113,6 +113,14 @@ describe.skipIf(process.platform !== "darwin")(
expect(result.exitCode).toBe(1);
expect(result.json).toMatchObject({
code: "capability_unavailable",
+ message: expect.stringContaining(
+ "Pass path to inspect another plist",
+ ),
+ remediation: {
+ action: expect.stringContaining(
+ "Pass path to inspect another plist",
+ ),
+ },
details: {
operation: "inspect_plist",
reason: expect.stringContaining(