From 8ae7a10b32c98d5fcb9b68888d82b1b96ce50f63 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Thu, 21 Oct 2021 17:25:03 +0200 Subject: [PATCH] #785 exclude python cache directory for custom hooks --- contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb b/contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb index f168a4e35c0..6ef5f09ec03 100644 --- a/contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb +++ b/contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb @@ -52,7 +52,7 @@ def get_executables(directory) executables = [] if File.directory? directory Dir.foreach directory do |item| - next if ['.', '..'].include? item + next if ['.', '..', '__pycache__'].include? item # Use full relative path path = "#{directory}/#{item}"