fix netlify deploy output and uploads (#2107)

Co-authored-by: embire2 <ceo@openweb.co.za>
This commit is contained in:
Keoma Wright
2026-02-05 22:45:56 +02:00
committed by GitHub
parent 3f6050b227
commit 409696fa3c
7 changed files with 114 additions and 31 deletions

View File

@@ -0,0 +1,15 @@
const MAX_BUILD_OUTPUT_CHARS = 4000;
export function formatBuildFailureOutput(output?: string) {
const trimmed = output?.trim();
if (!trimmed) {
return 'Build failed with no output captured.';
}
if (trimmed.length <= MAX_BUILD_OUTPUT_CHARS) {
return trimmed;
}
return `Build output (truncated):\n${trimmed.slice(-MAX_BUILD_OUTPUT_CHARS)}`;
}