Merge pull request #1258 from morluto/fix/inspect-plist-default-remediation

fix(native): name the plist selection that works when Info.plist is missing
This commit is contained in:
Kaoru0822
2026-10-09 02:47:30 -07:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+4 -1
View File
@@ -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} Select another plist in the target with the path input (CLI: --relative-path).`;
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, [
{
@@ -113,6 +113,12 @@ describe.skipIf(process.platform !== "darwin")(
expect(result.exitCode).toBe(1);
expect(result.json).toMatchObject({
code: "capability_unavailable",
message: expect.stringContaining("(CLI: --relative-path)"),
remediation: {
action: expect.stringContaining(
"Select another plist in the target with the path input (CLI: --relative-path).",
),
},
details: {
operation: "inspect_plist",
reason: expect.stringContaining(