Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-08-30 17:06:40 +0300
committerJacob Vosmaer <jacob@gitlab.com>2016-09-02 12:49:40 +0300
commita93a610bac7d9ee7c0908592b6a5d91ef0d94333 (patch)
treeeeec3f3161f74abd2f213145c7ce9d55f5f471e1 /lib/gitlab/popen.rb
parentfd1741b47970fc52d994367ba38b5d1353d94725 (diff)
Use 'git update-ref' for safer web commits
Diffstat (limited to 'lib/gitlab/popen.rb')
-rw-r--r--lib/gitlab/popen.rb4
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