Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
14ec3adf
Commit
14ec3adf
authored
Apr 05, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use w+b mode when Trace#set
parent
908aad0a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/ci/trace.rb
lib/gitlab/ci/trace.rb
+4
-4
No files found.
lib/gitlab/ci/trace.rb
View file @
14ec3adf
...
@@ -36,7 +36,7 @@ module Gitlab
...
@@ -36,7 +36,7 @@ module Gitlab
end
end
def
set
(
data
)
def
set
(
data
)
write
do
|
stream
|
write
(
'w+b'
)
do
|
stream
|
data
=
job
.
hide_secrets
(
data
)
data
=
job
.
hide_secrets
(
data
)
stream
.
set
(
data
)
stream
.
set
(
data
)
end
end
...
@@ -75,14 +75,14 @@ module Gitlab
...
@@ -75,14 +75,14 @@ module Gitlab
stream
&
.
close
stream
&
.
close
end
end
def
write
def
write
(
mode
=
'a+b'
)
stream
=
Gitlab
::
Ci
::
Trace
::
Stream
.
new
do
stream
=
Gitlab
::
Ci
::
Trace
::
Stream
.
new
do
if
current_path
if
current_path
current_path
File
.
open
(
current_path
,
mode
)
elsif
Feature
.
enabled?
(
'ci_enable_live_trace'
)
elsif
Feature
.
enabled?
(
'ci_enable_live_trace'
)
Gitlab
::
Ci
::
Trace
::
ChunkedIO
.
new
(
job
)
Gitlab
::
Ci
::
Trace
::
ChunkedIO
.
new
(
job
)
else
else
File
.
open
(
ensure_path
,
"a+b"
)
File
.
open
(
ensure_path
,
mode
)
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment