refactor(apple): reuse the catalog output byte count (#17368)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-12-06 11:07:58 +08:00
1 parent e50f098e04
commit ec7c038355
1 file changed
+3 -3
@@ -403,14 +403,14 @@ const inspectAssetCatalogEntry = async (input: {
`Asset catalog changed during inspection: ${entry.path}`,
{ integrityCheck: "member-identity" },
);
const capturedOutput: AnalysisCapturedOutput = {
const capturedOutput = {
stdout: output,
stderr: "",
truncated: false,
stdout_bytes: Buffer.byteLength(output),
exit_code: 0,
signal: null,
};
} satisfies AnalysisCapturedOutput;
const diagnostics = { catalog_path: entry.path };
const decoded = parseJsonWithDuplicatePolicy(output, "reject");
if (!decoded.ok) {
@@ -434,7 +434,7 @@ const inspectAssetCatalogEntry = async (input: {
sha256,
records: parseAppleAssetCatalogRecords(parsed),
},
metadataBytes: Buffer.byteLength(output, "utf8"),
metadataBytes: capturedOutput.stdout_bytes,
};
} catch (cause: unknown) {
if (!(cause instanceof AnalysisOutputError)) throw cause;