@@ -210,23 +210,18 @@ async function main() {
210210 true
211211 )
212212
213- core . summary . write ( )
213+ core . summary . write ( { overwrite : true } )
214214 return
215215 }
216216
217217 core . summary . clear ( )
218218
219- core . summary . addList (
220- notFormattedFiles . map ( ( file ) => `\`${ file } \`` ) ,
221- false
222- )
223-
224- /** @type {string } */
225- const fileList = core . summary . stringify ( )
226- core . summary . clear ( )
227-
228219 core . summary . addHeading ( 'Result' , 1 )
229220 core . summary . addRaw ( ':x: Some files are not formatted correctly' , true )
221+ core . summary . addBreak ( )
222+
223+ /** @type {string } */
224+ const fileList = notFormattedFiles . map ( ( file ) => `- \`${ file } \`` )
230225
231226 core . summary . addDetails ( 'Affected Files' , fileList )
232227 core . summary . addSeparator ( )
@@ -235,21 +230,24 @@ async function main() {
235230 'To format the files run the following command' ,
236231 true
237232 )
233+ core . summary . addBreak ( )
238234
239235 /** @type {string } */
240- const additionalArgs = formatFile === '' ? [ ] : [ `-c ${ formatFile } ` ]
236+ const additionalArgs = formatFile === '' ? [ ] : [ `-c " ${ formatFile } " ` ]
241237
242238 /** @type {string } */
243- const finalFileList = notFormattedFiles . join ( ' ' )
239+ const finalFileList = notFormattedFiles
240+ . map ( ( file ) => `"${ file } "` )
241+ . join ( ' ' )
244242
245243 core . summary . addCodeBlock (
246244 `meson format ${ additionalArgs } -i ${ finalFileList } ` ,
247245 'bash'
248246 )
249247
250- core . summary . write ( )
248+ core . summary . write ( { overwrite : true } )
251249
252- throw new Error ( 'Soem files are not formatted correctly' )
250+ throw new Error ( 'Some files are not formatted correctly' )
253251 } catch ( error ) {
254252 core . setFailed ( error )
255253 }
0 commit comments