diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index b1e9caf4..b2ceab9a 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -72,13 +72,17 @@ public function run(InputInterface $input, OutputInterface $output): int /** @return array */ 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(); }