summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rwxr-xr-xbin/create-hooks6
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5c48b02..c0e37f9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,7 @@ v2.0.0
- Replace raise with abort when checking path to prevent path exposure
- Handle invalid number of arguments on remote commands
- Replace update hook with pre-receive and post-receive hooks.
+ - Ignore missing repositories in create-hooks
v1.9.7
- Increased test coverage
diff --git a/bin/create-hooks b/bin/create-hooks
index d6f07c7..4efa650 100755
--- a/bin/create-hooks
+++ b/bin/create-hooks
@@ -8,5 +8,9 @@ require_relative '../lib/gitlab_init'
require File.join(ROOT_PATH, 'lib', 'gitlab_projects')
Dir["#{GitlabConfig.new.repos_path}/*/*.git"].each do |repo|
- GitlabProjects.create_hooks(repo)
+ begin
+ GitlabProjects.create_hooks(repo)
+ rescue Errno::ENOENT
+ # The user must have deleted their repository. Ignore.
+ end
end