fix(native): report why a selected plist cannot be inspected

`inspect_plist` turned a missing selected plist, a directory, or a file
that is not a property list into a generic execution failure that
advised retrying and running `rea doctor`. A bare Mach-O without
Contents/Info.plist failed the same way.

Check the resolved path before running plutil and keep plutil's decode
diagnostic. A caller-selected path now fails as invalid input naming
the path and the reason; a missing default Info.plist is unavailable for
the target. The CLI no longer sends Contents/Info.plist as an explicit
selection, so its default matches the MCP default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Iwakurakaoru0822
2026-10-06 23:16:13 -07:00
co-authored by Claude Opus 5.5
parent cfd2b0c75d
commit 0674facd46
3 changed files with 163 additions and 4 deletions
+7 -3
View File
@@ -135,8 +135,10 @@ const registerNativeCommands = (cli: CliInstance, logger: Logger): void => {
options: z.object({
relativePath: z
.string()
.default("Contents/Info.plist")
.describe("Plist path relative to the app root"),
.optional()
.describe(
"Plist path relative to the app root (default: Contents/Info.plist)",
),
}),
alias: { relativePath: "relative-path" },
run: ({ args, options }) =>
@@ -144,7 +146,9 @@ const registerNativeCommands = (cli: CliInstance, logger: Logger): void => {
runProviderAnalysis(
args.path,
"inspect_plist",
{ path: options.relativePath },
options.relativePath === undefined
? {}
: { path: options.relativePath },
logger,
),
),