diff options
author | Alexander Kutelev <alexander@kutelev.ru> | 2020-06-06 13:35:15 +0300 |
---|---|---|
committer | Alexander Kutelev <alexander@kutelev.ru> | 2020-06-06 13:35:15 +0300 |
commit | 34e1d036bd06491f55462e1dc22e67cf978b6d66 (patch) | |
tree | d19a88ed9c779dc97d9b1893e5b9cce240ee2980 | |
parent | 7d374d517487d45ab12329fed1b19a9c13988bbe (diff) |
Do not put directories to a list of hooks to invoke.
-rw-r--r-- | ruby/gitlab-shell/lib/gitlab_custom_hook.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby/gitlab-shell/lib/gitlab_custom_hook.rb b/ruby/gitlab-shell/lib/gitlab_custom_hook.rb index ba3f760d2..2a3b022b4 100644 --- a/ruby/gitlab-shell/lib/gitlab_custom_hook.rb +++ b/ruby/gitlab-shell/lib/gitlab_custom_hook.rb @@ -92,7 +92,7 @@ class GitlabCustomHook return [] unless Dir.exist?(path) Dir["#{path}/*"].select do |f| - !f.end_with?('~') && File.executable?(f) + !f.end_with?('~') && File.file?(f) && File.executable?(f) end.sort end end |