mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 15:33:56 +08:00
refactor(apple): reuse the catalog output byte count (#17368)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user