Skip to content

Commit

Permalink
allow build command to work without pcntl
Browse files Browse the repository at this point in the history
  • Loading branch information
kohenkatz committed Aug 8, 2023
1 parent 16aaca0 commit 0256825
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Commands/BuildCommand.php
Original file line number Diff line number Diff line change
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 0256825

Please sign in to comment.