summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-05-03 13:12:15 -0700
committerStan Hu <stanhu@gmail.com>2019-05-05 03:24:27 -0700
commit09b44072e7749248a0224840e72de1b2a5cac671 (patch)
treed66801fb70577bce483545917b9051397beec82d /lib/tasks
parentfee5b0a4bcdd39762f8d5239dc37686714fb865c (diff)
downloadgitlab-ce-09b44072e7749248a0224840e72de1b2a5cac671.tar.gz
Remove stdout/stderr capture in static-analysis
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/lint.rake16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake
index fa45b092833..7aab53491e6 100644
--- a/lib/tasks/lint.rake
+++ b/lib/tasks/lint.rake
@@ -37,14 +37,8 @@ unless Rails.env.production?
lint:static_verification
].each do |task|
warn "#{Time.now} Running #{task}\n"
- 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)
+ pid = Process.fork do
begin
Rake::Task[task].invoke
rescue SystemExit => ex
@@ -54,15 +48,7 @@ unless Rails.env.production?
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
end