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

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'helper.rb')
-rw-r--r--helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/helper.rb b/helper.rb
index 6ac62d13d..eb022451a 100644
--- a/helper.rb
+++ b/helper.rb
@@ -14,16 +14,16 @@ end
# Note: tricks with the 'dir' argument and File.basename are there only
# to make the script output prettier.
-def run!(cmd, dir=nil)
- abort "failed" unless run(cmd, dir)
+def run!(cmd, dir=nil, env={})
+ abort "failed" unless run(cmd, dir, env)
end
-def run(cmd, dir=nil)
+def run(cmd, dir=nil, env={})
dir ||= Dir.pwd
cmd_s = cmd.join(' ')
warn "#{File.basename(dir)}$ #{cmd_s}"
start = Time.now
- status = system(*cmd, chdir: dir)
+ status = system(env, *cmd, chdir: dir)
delta = Time.now - start
warn sprintf("time: %.3fs\n", delta) if delta > 1.0
status