From d962b6867de4a953ecbd2c12339e078a250698c1 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 8 Jun 2018 14:35:52 +0200 Subject: Empty, not remove hooks --- spec/support/helpers/test_env.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index adc429a8a7e..4a73145cc93 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -137,7 +137,9 @@ module TestEnv task: 'gitlab:shell:install') # gitlab-shell hooks don't work in our test environment because they try to make internal API calls - FileUtils.rm_rf(File.join(Gitlab.config.gitlab_shell.path, 'hooks')) + hooks_dir = File.join(Gitlab.config.gitlab_shell.path, 'hooks') + FileUtils.rm_rf(hooks_dir) + FileUtils.mkdir_p(hooks_dir) end def setup_gitaly -- cgit v1.2.1