Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-26 13:23:01 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-01-26 13:29:44 +0300
commit050103f2093c914b70a61ee23fba86942b5b9cc2 (patch)
treed541830b1b790fdbc0346dfc11145ea7f47b6785 /lib
parent37b4503125c797fbcb7b00f1e73d574dfdfa5816 (diff)
Make sure TraceReader uses Encoding.default_external
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