File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,17 +60,24 @@ async function main(): Promise<void> {
6060 return ;
6161 }
6262
63+ const MAX_ERROR_CHARS = 1000 ;
64+
6365 const { ok, output } = runCommand ( COMMAND . tool , COMMAND . cmd ) ;
6466 const failures = ok ? [ ] : [ { tool : COMMAND . tool , output } ] ;
6567
68+ const truncatedOutput =
69+ output && output . length > MAX_ERROR_CHARS
70+ ? output . slice ( 0 , MAX_ERROR_CHARS ) + "\n… (truncated)"
71+ : output || "(no output)" ;
72+
6673 const result =
6774 failures . length > 0
6875 ? {
6976 followup_message : [
7077 `Please fix the errors reported by ${ COMMAND . tool } .` ,
7178 "Don't do any other investigation." ,
7279 "" ,
73- `<${ COMMAND . tool } -errors>\n${ output || "(no output)" } \n</${ COMMAND . tool } -errors>` ,
80+ `<${ COMMAND . tool } -errors>\n${ truncatedOutput } \n</${ COMMAND . tool } -errors>` ,
7481 ] . join ( "\n" ) ,
7582 }
7683 : { } ;
You can’t perform that action at this time.
0 commit comments