Skip to content

Commit 833f62a

Browse files
authored
Merge pull request #479 from kohenkatz/patch-dont-require-pcntl
Allow build command to work without pcntl
2 parents 16aaca0 + 0256825 commit 833f62a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Commands/BuildCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,17 @@ public function run(InputInterface $input, OutputInterface $output): int
7272
/** @return array<int, int> */
7373
public function getSubscribedSignals(): array
7474
{
75-
return [\SIGINT];
75+
if (defined('SIGINT')) {
76+
return [\SIGINT];
77+
}
78+
79+
return [];
7680
}
7781

7882
/** {@inheritdoc} */
7983
public function handleSignal(int $signal): int|false
8084
{
81-
if ($signal === \SIGINT) {
85+
if (defined('SIGINT') && $signal === \SIGINT) {
8286
if (self::$config !== null) {
8387
$this->clear();
8488
}

0 commit comments

Comments
 (0)