summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-26 18:23:01 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-01-26 18:29:44 +0800
commit050103f2093c914b70a61ee23fba86942b5b9cc2 (patch)
treed541830b1b790fdbc0346dfc11145ea7f47b6785 /lib
parent37b4503125c797fbcb7b00f1e73d574dfdfa5816 (diff)
downloadgitlab-ce-050103f2093c914b70a61ee23fba86942b5b9cc2.tar.gz
Make sure TraceReader uses Encoding.default_externalfix-trace-reader-encoding
Encoding.default_external was chosen over Encoding.default_internal because File.read is returning Encoding.default_external, therefore we should align with it. Alternatively, we could force both of them to be Encoding.default_internal. However, ideally this should be determined by different projects. For example, some projects might want to use an encoding different to what GitLab is using. This might not happen soon though. Closes #27052
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/trace_reader.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/ci/trace_reader.rb b/lib/gitlab/ci/trace_reader.rb
index 37e51536e8f..1d7ddeb3e0f 100644
--- a/lib/gitlab/ci/trace_reader.rb
+++ b/lib/gitlab/ci/trace_reader.rb
@@ -42,6 +42,7 @@ module Gitlab
end
chunks.join.lines.last(max_lines).join
+ .force_encoding(Encoding.default_external)
end
end
end