summaryrefslogtreecommitdiff
path: root/qa/qa/service
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-03-28 19:48:09 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-03-29 19:40:32 +0800
commit9d9ee76197818486d3cd5a178af4b28ba8b4fc31 (patch)
tree7ea42602c23dc09b320b1d0d1e6a96423cc1ddc2 /qa/qa/service
parent4e712f766fb893705816fe199b1225460dd451b2 (diff)
downloadgitlab-ce-9d9ee76197818486d3cd5a178af4b28ba8b4fc31.tar.gz
Use Service::Shellout.shell to spawn a command
Diffstat (limited to 'qa/qa/service')
-rw-r--r--qa/qa/service/shellout.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/qa/qa/service/shellout.rb b/qa/qa/service/shellout.rb
index 76fb2af6319..1ca9504bb33 100644
--- a/qa/qa/service/shellout.rb
+++ b/qa/qa/service/shellout.rb
@@ -5,6 +5,8 @@ module QA
module Shellout
CommandError = Class.new(StandardError)
+ module_function
+
##
# TODO, make it possible to use generic QA framework classes
# as a library - gitlab-org/gitlab-qa#94
@@ -12,7 +14,7 @@ module QA
def shell(command)
puts "Executing `#{command}`"
- Open3.popen2e(command) do |_in, out, wait|
+ Open3.popen2e(*command) do |_in, out, wait|
out.each { |line| puts line }
if wait.value.exited? && wait.value.exitstatus.nonzero?