summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/ansi2json
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-27 15:06:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-27 15:06:45 +0000
commita98649b71085bcd21af674a47d6a746336c56a65 (patch)
tree1e518ce4f61a8d7260ba9d6d3b8db8906251d6a0 /lib/gitlab/ci/ansi2json
parenta4484fd22dd0d055a10fe084b82349e42f7363e1 (diff)
downloadgitlab-ce-a98649b71085bcd21af674a47d6a746336c56a65.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/ansi2json')
-rw-r--r--lib/gitlab/ci/ansi2json/parser.rb5
-rw-r--r--lib/gitlab/ci/ansi2json/style.rb4
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/gitlab/ci/ansi2json/parser.rb b/lib/gitlab/ci/ansi2json/parser.rb
index d428680fb2a..79b42a5f5bf 100644
--- a/lib/gitlab/ci/ansi2json/parser.rb
+++ b/lib/gitlab/ci/ansi2json/parser.rb
@@ -94,7 +94,7 @@ module Gitlab
def on_38(stack) { fg: fg_color_256(stack) } end
- def on_39(_) { fg: fg_color(9) } end
+ def on_39(_) { fg: nil } end
def on_40(_) { bg: bg_color(0) } end
@@ -114,8 +114,7 @@ module Gitlab
def on_48(stack) { bg: bg_color_256(stack) } end
- # TODO: all the x9 never get called?
- def on_49(_) { fg: fg_color(9) } end
+ def on_49(_) { bg: nil } end
def on_90(_) { fg: fg_color(0, 'l') } end
diff --git a/lib/gitlab/ci/ansi2json/style.rb b/lib/gitlab/ci/ansi2json/style.rb
index 77f61178b37..4d38ea55866 100644
--- a/lib/gitlab/ci/ansi2json/style.rb
+++ b/lib/gitlab/ci/ansi2json/style.rb
@@ -61,9 +61,9 @@ module Gitlab
case
when changes[:reset]
reset!
- when changes[:fg]
+ when changes.key?(:fg)
@fg = changes[:fg]
- when changes[:bg]
+ when changes.key?(:bg)
@bg = changes[:bg]
when changes[:enable]
@mask |= changes[:enable]