Skip to content

Commit 0bfdb7d

Browse files
committed
Bugfix
1 parent 50f8bef commit 0bfdb7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Cli/VerboseModeEnabler.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Bref\Cli\Cli;
44

55
use Amp\ByteStream\ReadableResourceStream;
6+
use Amp\CancelledException;
67
use Amp\DeferredCancellation;
78
use Symfony\Component\Console\Input\InputInterface;
89
use Symfony\Component\Console\Input\StreamableInputInterface;
@@ -77,7 +78,11 @@ public static function isRunning(): bool
7778

7879
public static function stop(): void
7980
{
80-
self::$verboseWatchCancellation?->cancel();
81+
try {
82+
self::$verboseWatchCancellation?->cancel();
83+
} catch (CancelledException) {
84+
// Ignore: the cancellation already happened, this edge case has been reported by users
85+
}
8186
self::$verboseWatchCancellation = null;
8287
}
8388

0 commit comments

Comments
 (0)