summaryrefslogtreecommitdiff
path: root/lib/gitlab_custom_hook.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_custom_hook.rb')
-rw-r--r--lib/gitlab_custom_hook.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab_custom_hook.rb b/lib/gitlab_custom_hook.rb
index 451d5b4..6265ec1 100644
--- a/lib/gitlab_custom_hook.rb
+++ b/lib/gitlab_custom_hook.rb
@@ -92,7 +92,7 @@ class GitlabCustomHook
# the resulting list is sorted
def match_hook_files(path)
Dir["#{path}/*"].select do |f|
- !f[/~$/] && File.executable?(f)
+ !f.end_with?('~') && File.executable?(f)
end.sort
end
end