diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2016-08-30 16:06:40 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2016-09-02 11:49:40 +0200 |
commit | a93a610bac7d9ee7c0908592b6a5d91ef0d94333 (patch) | |
tree | eeec3f3161f74abd2f213145c7ce9d55f5f471e1 /lib/gitlab/popen.rb | |
parent | fd1741b47970fc52d994367ba38b5d1353d94725 (diff) | |
download | gitlab-ce-a93a610bac7d9ee7c0908592b6a5d91ef0d94333.tar.gz |
Use 'git update-ref' for safer web commits
Diffstat (limited to 'lib/gitlab/popen.rb')
-rw-r--r-- | lib/gitlab/popen.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |