mirror of
https://github.com/morluto/rea
synced 2026-10-28 15:07:26 -04:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user