diff --git a/CHANGELOG b/CHANGELOG index 8052181a9619d5f5d8ed3e5f2a722eb8a8f1e7c5..aaf6c40c0244e1570c111b1318e4d1a2ee513148 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,6 +20,7 @@ v 7.7.0 - Add alert message in case of outdated browser (IE < 10) - - Added API support for sorting projects + - Close standard input in Gitlab::Popen.popen v 7.6.0 - Fork repository to groups diff --git a/lib/gitlab/popen.rb b/lib/gitlab/popen.rb index e2fbafb389911ef68e4da2da7da917f6acb9e86a..fea4d2d55d22b92dcaba7ee94d8500ca05100f4d 100644 --- a/lib/gitlab/popen.rb +++ b/lib/gitlab/popen.rb @@ -21,6 +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. + stdin.close @cmd_output << stdout.read @cmd_output << stderr.read @cmd_status = wait_thr.value.exitstatus