summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-05-02 18:50:43 +0200
committerJacob Vosmaer <jacob@gitlab.com>2018-05-02 18:50:43 +0200
commit7f9d3f12f6980bd88b951ae5031422a73a3f86fa (patch)
tree84499ed37a7a02ae3c69438bb311d6c6e2b89c3d
parent581a03052af991838bc5b149cd1f03edfe4bd29c (diff)
downloadgitlab-ce-gitlab-git-nlbr.tar.gz
Different paranoid debugginggitlab-git-nlbr
-rw-r--r--lib/gitlab/git/hook.rb4
-rw-r--r--spec/lib/gitlab/git/hook_spec.rb4
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|