Commit d87c4b9c authored by Elan Ruusamäe's avatar Elan Ruusamäe Committed by Sean McGivern

use String.end_with? instead of regexp

parent 5b740fcf
...@@ -92,7 +92,7 @@ class GitlabCustomHook ...@@ -92,7 +92,7 @@ class GitlabCustomHook
# the resulting list is sorted # the resulting list is sorted
def match_hook_files(path) def match_hook_files(path)
Dir["#{path}/*"].select do |f| Dir["#{path}/*"].select do |f|
!f[/~$/] && File.executable?(f) !f.end_with?('~') && File.executable?(f)
end.sort end.sort
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment