From 7f9d3f12f6980bd88b951ae5031422a73a3f86fa Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 2 May 2018 18:50:43 +0200 Subject: Different paranoid debugging --- lib/gitlab/git/hook.rb | 4 +++- spec/lib/gitlab/git/hook_spec.rb | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/gitlab/git/hook.rb b/lib/gitlab/git/hook.rb index 5aeb99a1702..846652b06da 100644 --- a/lib/gitlab/git/hook.rb +++ b/lib/gitlab/git/hook.rb @@ -11,7 +11,9 @@ module Gitlab def initialize(name, repository) @name = name @repository = repository - @path = File.join(repo_path.strip, 'hooks', name) + @path = File.join(repo_path, 'hooks', name) +p @path +system('ls', '-l', File.dirname(@path)) end def repo_path diff --git a/spec/lib/gitlab/git/hook_spec.rb b/spec/lib/gitlab/git/hook_spec.rb index 24123b6ed60..7be89951851 100644 --- a/spec/lib/gitlab/git/hook_spec.rb +++ b/spec/lib/gitlab/git/hook_spec.rb @@ -24,8 +24,6 @@ describe Gitlab::Git::Hook do f.write('#!/bin/sh') f.write('exit 0') end - - raise 'Failed to create hook' unless File.executable?(hook_path) end def create_failing_hook(name) @@ -40,8 +38,6 @@ describe Gitlab::Git::Hook do exit 1 HOOK end - - raise 'Failed to create hook' unless File.executable?(hook_path) end ['pre-receive', 'post-receive', 'update'].each do |hook_name| -- cgit v1.2.1