summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-04 15:21:34 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-04 15:21:34 +0200
commit99f07fd2a11b9e226ee39d6018f41cf282cedf86 (patch)
tree3386f3b8f56d8c3e4350de8819ea5d7bdd007245
parent3c97aea3e7cceaa5f212e72bfade28883685d21b (diff)
parent919e70c86a8dac08de0705310d2b6d6b21e022c3 (diff)
downloadgitlab-shell-99f07fd2a11b9e226ee39d6018f41cf282cedf86.tar.gz
Merge branch 'git_annex_env_variable'
-rw-r--r--lib/gitlab_shell.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 7c75910..57c319c 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -119,7 +119,17 @@ class GitlabShell
# This method is not covered by Rspec because it ends the current Ruby process.
def exec_cmd(*args)
- Kernel::exec({ 'PATH' => ENV['PATH'], 'LD_LIBRARY_PATH' => ENV['LD_LIBRARY_PATH'], 'GL_ID' => @key_id }, *args, unsetenv_others: true)
+ env = {
+ 'PATH' => ENV['PATH'],
+ 'LD_LIBRARY_PATH' => ENV['LD_LIBRARY_PATH'],
+ 'GL_ID' => @key_id
+ }
+
+ if @config.git_annex_enabled?
+ env.merge!({ 'GIT_ANNEX_SHELL_LIMITED' => '1' })
+ end
+
+ Kernel::exec(env, *args, unsetenv_others: true)
end
def api