1

I'm using grunt in my project to run my unit test (use karma), test coverage, code analysis (tslint), ... I easily include my grunt task into my TFS build proccess template, thanks to activity 'Invoke process':

enter image description here

WriteBuildMessage only print sdtOutput msg and i got the following result :

grunt output TFS

Why output format like this : ←[31m>> ←[39m ?

Thanks.

Felix_Billon
  • 690
  • 2
  • 10
  • 21

2 Answers2

2

These codes are ANSI escape code, however, windows terminal doesn't understand them.

Here is a related question : How to make win32 console recognize ANSI/VT100 escape sequences?

Community
  • 1
  • 1
user2595529
  • 161
  • 5
  • A note: You should be able to use the command line switch `--no-color`, which will remove some, if not all, of the escape codes. – Daniel Mann Dec 24 '14 at 15:18
  • This what i did (use --no-color) but this is not working, i always get weird char, i'm gonna try espcape codes :) – Felix_Billon Dec 24 '14 at 15:25
  • It's not that the windows terminal doesn't understand them, it's that when you redirect the console output to a file you have the escape sequences in the file. – Edward Thomson Dec 24 '14 at 19:00
0

So i try --no-color option but this not working. Finally i add the foolowing line to my Gruntfile.js : grunt.file.defaultEncoding = 'utf8';

This works perfectly ! Thanks for your help everybody.

Felix_Billon
  • 690
  • 2
  • 10
  • 21