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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e82f6d97
Commit
e82f6d97
authored
May 17, 2019
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid pipes so it doesn't overflow
parent
0e36d88c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
26 deletions
+9
-26
lib/tasks/lint.rake
lib/tasks/lint.rake
+9
-26
No files found.
lib/tasks/lint.rake
View file @
e82f6d97
...
...
@@ -37,32 +37,15 @@ unless Rails.env.production?
lint:static_verification
]
.
each
do
|
task
|
pid
=
Process
.
fork
do
rd_out
,
wr_out
=
IO
.
pipe
rd_err
,
wr_err
=
IO
.
pipe
stdout
=
$stdout
.
dup
stderr
=
$stderr
.
dup
$stdout
.
reopen
(
wr_out
)
$stderr
.
reopen
(
wr_err
)
begin
Rake
::
Task
[
task
].
invoke
rescue
SystemExit
=>
ex
msg
=
"*** Rake task
#{
task
}
exited:"
raise
ex
rescue
=>
ex
msg
=
"*** Rake task
#{
task
}
raised
#{
ex
.
class
}
:"
raise
ex
ensure
$stdout
.
reopen
(
stdout
)
$stderr
.
reopen
(
stderr
)
wr_out
.
close
wr_err
.
close
warn
"
\n
#{
msg
}
\n\n
"
if
msg
IO
.
copy_stream
(
rd_out
,
$stdout
)
IO
.
copy_stream
(
rd_err
,
$stderr
)
end
puts
"*** Running rake task:
#{
task
}
***"
Rake
::
Task
[
task
].
invoke
rescue
SystemExit
=>
ex
warn
"!!! Rake task
#{
task
}
exited:"
raise
ex
rescue
StandardError
,
ScriptError
=>
ex
warn
"!!! Rake task
#{
task
}
raised
#{
ex
.
class
}
:"
raise
ex
end
Process
.
waitpid
(
pid
)
...
...
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