Skip to content

Commit

Permalink
Use exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel committed Jun 20, 2024
1 parent 1ba8a05 commit b69b541
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Commands/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/HookCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit b69b541

Please sign in to comment.