diff --git a/src/Console/Helper/PathsHelper.php b/src/Console/Helper/PathsHelper.php index f112cfcd2..30986a81d 100644 --- a/src/Console/Helper/PathsHelper.php +++ b/src/Console/Helper/PathsHelper.php @@ -170,7 +170,8 @@ public function getGitHooksDir() if (is_file($gitRepoPath)) { $fileContent = $this->fileSystem->readFromFileInfo(new SplFileInfo($gitRepoPath)); if (preg_match('/gitdir:\s+(\S+)/', $fileContent, $matches)) { - return $this->getRelativePath($gitPath . $matches[1] . '/hooks/'); + $relativePath = $this->getRelativePath($matches[1]); + return $this->getRelativePath($gitPath . $relativePath . '/hooks/'); } }