0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-30 22:34:10 -05:00

don't color multiline strings in logs output

stack traces should be easily recognizable
This commit is contained in:
Alex Kocharin 2013-12-16 03:07:19 +04:00
parent 0cec69ee1d
commit 8ea985ff6b

View file

@ -132,7 +132,7 @@ function print(type, msg, obj, colors) {
}
if (typeof(str) === 'string') {
if (!colors) {
if (!colors || ~str.indexOf('\n')) {
return str
} else if (is_error) {
return '\033[31m' + str + '\033[39m'