diff options
author | Ryan Cobb <rcobb@gitlab.com> | 2019-05-20 13:12:12 -0600 |
---|---|---|
committer | Ryan Cobb <rcobb@gitlab.com> | 2019-05-20 13:12:12 -0600 |
commit | 06c3a4b733613dba33ae36ad99d977103f0843aa (patch) | |
tree | b2cc0966aa52b53d8bfcfb211d44d0ef9f0ed5ef /lib/tasks/lint.rake | |
parent | 618dd80c7d8ebcdb573977780f29bf1475efa4f2 (diff) | |
parent | bdc2eb33e160006cd34128e391becff86a3bc060 (diff) | |
download | gitlab-ce-61964-sys-proctable-performance.tar.gz |
Merge branch 'master' into 61964-sys-proctable-performance61964-sys-proctable-performance
Diffstat (limited to 'lib/tasks/lint.rake')
-rw-r--r-- | lib/tasks/lint.rake | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake index c5d0f2c292f..2353b2dc659 100644 --- a/lib/tasks/lint.rake +++ b/lib/tasks/lint.rake @@ -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) |