File tree Expand file tree Collapse file tree
src/ci_provider/github_actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,23 +28,17 @@ impl Log for GithubActionLogger {
2828 return ;
2929 }
3030
31- match level {
32- Level :: Error => {
33- println ! ( "::error::{}" , message) ;
34- }
35- Level :: Warn => {
36- println ! ( "::warning::{}" , message) ;
37- }
38- Level :: Info => {
39- println ! ( "{}" , message) ;
40- }
41- Level :: Debug => {
42- println ! ( "::debug::{}" , message) ;
43- }
44- Level :: Trace => {
45- println ! ( "::debug::[TRACE]{}" , message) ;
46- }
47- }
31+ let prefix = match level {
32+ Level :: Error => "::error::" ,
33+ Level :: Warn => "::warning::" ,
34+ Level :: Info => "" ,
35+ Level :: Debug => "::debug::" ,
36+ Level :: Trace => "::debug::[TRACE]" ,
37+ } ;
38+ let message_string = message. to_string ( ) ;
39+ let lines = message_string. lines ( ) ;
40+ // ensure that all the lines of the message have the prefix, otherwise GitHub Actions will not recognize the command for the whole string
41+ lines. for_each ( |line| println ! ( "{}{}" , prefix, line) ) ;
4842 }
4943
5044 fn flush ( & self ) { }
You can’t perform that action at this time.
0 commit comments