Skip to content

Commit 92751a6

Browse files
authored
Create .git/hooks if it doesnt exist
1 parent a8a22be commit 92751a6

File tree

1 file changed

+1
-1
lines changed
  • src/PhpGitHooks/Module/Configuration/Infrastructure/Hook

1 file changed

+1
-1
lines changed

src/PhpGitHooks/Module/Configuration/Infrastructure/Hook/HookCopier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private function hookExists($hookFile)
3838
*/
3939
private function copyFile($hookFile)
4040
{
41-
$copy = new Process(sprintf('cp %s %s', $hookFile, $this->hookDir));
41+
$copy = new Process(sprintf("mkdir -p {$this->hookDir} && cp %s %s", $hookFile, $this->hookDir));
4242
$copy->run();
4343
}
4444

0 commit comments

Comments
 (0)