diff --git a/src/Commands/Command.php b/src/Commands/Command.php index 6fd93b3..8088d4e 100644 --- a/src/Commands/Command.php +++ b/src/Commands/Command.php @@ -41,7 +41,7 @@ final protected function execute(InputInterface $input, OutputInterface $output) } if ($this->gitDir === false) { $output->writeln('Git is not initialized. Skip setting hooks...'); - return 0; + return SymfonyCommand::SUCCESS; } $this->lockFile = (null !== $this->lockDir ? ($this->lockDir . '/') : '') . Hook::LOCK_FILE; @@ -52,7 +52,7 @@ final protected function execute(InputInterface $input, OutputInterface $output) $this->init($input); $this->command(); - return 0; + return SymfonyCommand::SUCCESS; } protected function global_dir_fallback() diff --git a/src/Commands/HookCommand.php b/src/Commands/HookCommand.php index d1e9c4d..f8b5186 100644 --- a/src/Commands/HookCommand.php +++ b/src/Commands/HookCommand.php @@ -34,7 +34,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int { $contents = Hook::getHookContents($this->composerDir, $this->contents, $this->hook); $outputMessage = []; - $returnCode = 0; + $returnCode = SymfonyCommand::SUCCESS; exec($contents, $outputMessage, $returnCode); $output->writeln(implode(PHP_EOL, $outputMessage));