fix netlify deploy output and uploads (#2107)
Co-authored-by: embire2 <ceo@openweb.co.za>
This commit is contained in:
15
app/components/deploy/deployUtils.ts
Normal file
15
app/components/deploy/deployUtils.ts
Normal 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)}`;
|
||||
}
|
||||
Reference in New Issue
Block a user