File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 3737 - name : Get failed tests
3838 id : get-failed-tests
3939 if : ${{ !cancelled() }}
40- run : |
41- CONTENT=$(cat ./playwright-errors/errors.md)
42- {
43- echo 'content<<EOF'
44- echo $CONTENT
45- echo EOF
46- } >> $GITHUB_OUTPUT
40+ run : echo "content='$(printf "%s\n" "$(cat ./playwright-errors/errors.md)")'" >> $GITHUB_OUTPUT
4741 - uses : actions/upload-artifact@v4
4842 if : ${{ !cancelled() }}
4943 id : artifact-upload-step
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ class MyReporter implements Reporter {
2020 return input . replace ( / \[ [ 0 - 9 ; ] * m / g, '' )
2121 }
2222
23+ escapeQuotes ( input : string ) {
24+ return input . replace ( / ( [ \' \" ] ) / g, '\\$1' )
25+ }
26+
2327 cleanupFolder ( ) {
2428 const folderPath = path . resolve ( this . outputFolder )
2529
@@ -82,6 +86,8 @@ class MyReporter implements Reporter {
8286 reportContent += `## Failed Tests
8387
8488${ this . testResults . join ( '' ) } `
89+
90+ reportContent = this . escapeQuotes ( reportContent )
8591 }
8692
8793 fs . writeFileSync ( reportPath , reportContent )
You can’t perform that action at this time.
0 commit comments