2016-01-30 13:47:04 +00:00
|
|
|
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb
|
2017-07-05 22:53:31 +01:00
|
|
|
index 0b11ce3..ffc3faf 100644
|
2016-01-30 13:47:04 +00:00
|
|
|
--- a/lib/gitlab_projects.rb
|
|
|
|
+++ b/lib/gitlab_projects.rb
|
2017-07-05 22:53:31 +01:00
|
|
|
@@ -8,7 +8,7 @@ require_relative 'gitlab_metrics'
|
2017-11-06 19:02:26 +00:00
|
|
|
require_relative 'gitlab_metrics'
|
2016-01-30 13:47:04 +00:00
|
|
|
|
|
|
|
class GitlabProjects
|
|
|
|
- GLOBAL_HOOKS_DIRECTORY = File.join(ROOT_PATH, 'hooks')
|
|
|
|
+ GLOBAL_HOOKS_DIRECTORY = ENV['GITLAB_SHELL_HOOKS_PATH'] || File.join(ROOT_PATH, 'hooks')
|
|
|
|
|
|
|
|
# Project name is a directory name for repository with .git at the end
|
|
|
|
# It may be namespaced or not. Like repo.git or gitlab/repo.git
|
2017-07-05 22:53:31 +01:00
|
|
|
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
|
|
|
|
index e7d0254..181ec8a 100644
|
|
|
|
--- a/lib/gitlab_shell.rb
|
|
|
|
+++ b/lib/gitlab_shell.rb
|
2017-11-06 19:02:26 +00:00
|
|
|
@@ -188,7 +188,8 @@ class GitlabShell
|
2017-07-05 22:53:31 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
# We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is.
|
|
|
|
- Kernel::exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH)
|
|
|
|
+ # Except we don't, because we're already in the right directory on nixos !
|
|
|
|
+ Kernel::exec(env, *args, unsetenv_others: true)
|
|
|
|
end
|
|
|
|
|
|
|
|
def api
|