Skip to content

Commit

Permalink
Merge pull request #479 from kohenkatz/patch-dont-require-pcntl
Browse files Browse the repository at this point in the history
Allow build command to work without pcntl
  • Loading branch information
owenvoke committed Aug 8, 2023
2 parents 16aaca0 + 0256825 commit 833f62a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Commands/BuildCommand.php
Expand Up @@ -72,13 +72,17 @@ public function run(InputInterface $input, OutputInterface $output): int
/** @return array<int, int> */
public function getSubscribedSignals(): array
{
return [\SIGINT];
if (defined('SIGINT')) {
return [\SIGINT];
}

return [];
}

/** {@inheritdoc} */
public function handleSignal(int $signal): int|false
{
if ($signal === \SIGINT) {
if (defined('SIGINT') && $signal === \SIGINT) {
if (self::$config !== null) {
$this->clear();
}
Expand Down

0 comments on commit 833f62a

Please sign in to comment.