Skip to content

Commit b69b541

Browse files
committed
Use exit code
1 parent 1ba8a05 commit b69b541

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Commands/Command.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ final protected function execute(InputInterface $input, OutputInterface $output)
4141
}
4242
if ($this->gitDir === false) {
4343
$output->writeln('Git is not initialized. Skip setting hooks...');
44-
return 0;
44+
return SymfonyCommand::SUCCESS;
4545
}
4646
$this->lockFile = (null !== $this->lockDir ? ($this->lockDir . '/') : '') . Hook::LOCK_FILE;
4747

@@ -52,7 +52,7 @@ final protected function execute(InputInterface $input, OutputInterface $output)
5252
$this->init($input);
5353
$this->command();
5454

55-
return 0;
55+
return SymfonyCommand::SUCCESS;
5656
}
5757

5858
protected function global_dir_fallback()

src/Commands/HookCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
3434
{
3535
$contents = Hook::getHookContents($this->composerDir, $this->contents, $this->hook);
3636
$outputMessage = [];
37-
$returnCode = 0;
37+
$returnCode = SymfonyCommand::SUCCESS;
3838
exec($contents, $outputMessage, $returnCode);
3939

4040
$output->writeln(implode(PHP_EOL, $outputMessage));

0 commit comments

Comments
 (0)