This commit is contained in:
2024-04-05 01:52:08 +02:00
parent 200495442f
commit 17336c0470
2 changed files with 14 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ class InstallCommand extends Command
$git_directory = base_path('.git');
$git_hooks_directory = "{$git_directory}/hooks";
$this->line("Checking Git hooks directory...");
$this->line("Updating Git hooks...");
if (! is_dir($git_directory)) {
$this->error("Could not install hooks: $git_directory is not a Git repository");
@@ -61,6 +61,10 @@ class InstallCommand extends Command
$this->error("Could not install hooks: could not create Git hook file $git_hook_file");
return 1;
}
passthru("chmod +x $git_hook_file");
$this->line("Installed Git hook file: $git_hook_file");
}
return 0;