We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50f8bef commit 0bfdb7dCopy full SHA for 0bfdb7d
src/Cli/VerboseModeEnabler.php
@@ -3,6 +3,7 @@
3
namespace Bref\Cli\Cli;
4
5
use Amp\ByteStream\ReadableResourceStream;
6
+use Amp\CancelledException;
7
use Amp\DeferredCancellation;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Input\StreamableInputInterface;
@@ -77,7 +78,11 @@ public static function isRunning(): bool
77
78
79
public static function stop(): void
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
+ }
86
self::$verboseWatchCancellation = null;
87
}
88
0 commit comments