Skip to content

Commit 380cc8e

Browse files
authored
support newlines in error messages (#49)
1 parent de28430 commit 380cc8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cs2pr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ exit($exit);
107107
*/
108108
function annotateCheck($type, $filename, $line, $message, $colorize)
109109
{
110+
// newlines need to be encoded
111+
// see https://github.com/actions/starter-workflows/issues/68#issuecomment-581479448
112+
$message = str_replace("\n", '%0A', $message);
113+
110114
if ($colorize) {
111115
echo "\033[".($type==='error' ? '91' : '93')."m\n";
112116
}

0 commit comments

Comments
 (0)