summaryrefslogtreecommitdiff
path: root/lib/gitlab_shell.rb
diff options
context:
space:
mode:
authorChristian Höltje <choltje@us.ibm.com>2013-03-15 13:06:34 -0400
committerChristian Höltje <choltje@us.ibm.com>2013-03-15 13:06:34 -0400
commite794bdf37503360094e6414bb931dbf135e636ca (patch)
tree2145acfc3d75cf94d1fc7bfca40d60943f85a6c5 /lib/gitlab_shell.rb
parent0c6686b6e129db9086ac3fe0e896c892fe73f428 (diff)
downloadgitlab-shell-e794bdf37503360094e6414bb931dbf135e636ca.tar.gz
Use Kernel::exec instead of system()
We don't need to keep the ruby process around once we've established that it's ok to run a git command.
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r--lib/gitlab_shell.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 842714e..75c7751 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -44,13 +44,17 @@ class GitlabShell
def process_cmd
repo_full_path = File.join(repos_path, repo_name)
- system("#{@git_cmd} #{repo_full_path}")
+ exec_cmd "#{@git_cmd} #{repo_full_path}"
end
def validate_access
api.allowed?(@git_cmd, @repo_name, @key_id, '_any')
end
+ def exec_cmd args
+ Kernel::exec args
+ end
+
def api
GitlabNet.new
end