From a93a610bac7d9ee7c0908592b6a5d91ef0d94333 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 30 Aug 2016 16:06:40 +0200 Subject: Use 'git update-ref' for safer web commits --- lib/gitlab/popen.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/gitlab/popen.rb') diff --git a/lib/gitlab/popen.rb b/lib/gitlab/popen.rb index ca23ccef25b..a0fd41161a5 100644 --- a/lib/gitlab/popen.rb +++ b/lib/gitlab/popen.rb @@ -21,9 +21,9 @@ module Gitlab @cmd_output = "" @cmd_status = 0 Open3.popen3(vars, *cmd, options) do |stdin, stdout, stderr, wait_thr| - # We are not using stdin so we should close it, in case the command we - # are running waits for input. + yield(stdin) if block_given? stdin.close + @cmd_output << stdout.read @cmd_output << stderr.read @cmd_status = wait_thr.value.exitstatus -- cgit v1.2.1