diff options
author | elijah <elijah@riseup.net> | 2016-07-03 23:30:46 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-07-03 23:30:46 -0700 |
commit | 2cc2648f55ca394b7bcdfa2a2f5b1a8725ad15cf (patch) | |
tree | c2bb6d1178dd37aede3f6e6ec4de5be294922b95 | |
parent | 174dbf380fe1b0962a9e173caa6dd0a0f76a14e1 (diff) |
bugfix: better coloring of log lines that wrap
-rw-r--r-- | lib/leap_cli/log.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/leap_cli/log.rb b/lib/leap_cli/log.rb index 5203c97..9f7d28b 100644 --- a/lib/leap_cli/log.rb +++ b/lib/leap_cli/log.rb @@ -211,7 +211,13 @@ module LeapCli if style codes << EFFECTS[style] || EFFECTS[:nothing] end - ["\033[%sm" % codes.join(';'), str, NO_COLOR].join + if str.is_a?(String) + ["\033[%sm" % codes.join(';'), str, NO_COLOR].join + elsif str.is_a?(Array) + str.map { |s| + ["\033[%sm" % codes.join(';'), s, NO_COLOR].join + } + end end private |