Commit 9a9a3ffd authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Fix `flutter logs` on Windows (#8442)

parent 6491cbf7
...@@ -6,6 +6,7 @@ import 'dart:async'; ...@@ -6,6 +6,7 @@ import 'dart:async';
import '../base/common.dart'; import '../base/common.dart';
import '../base/io.dart'; import '../base/io.dart';
import '../base/platform.dart';
import '../cache.dart'; import '../cache.dart';
import '../device.dart'; import '../device.dart';
import '../globals.dart'; import '../globals.dart';
...@@ -66,10 +67,12 @@ class LogsCommand extends FlutterCommand { ...@@ -66,10 +67,12 @@ class LogsCommand extends FlutterCommand {
printStatus(''); printStatus('');
exitCompleter.complete(0); exitCompleter.complete(0);
}); });
ProcessSignal.SIGTERM.watch().listen((ProcessSignal signal) { if (!platform.isWindows) { // https://github.com/dart-lang/sdk/issues/28603
subscription.cancel(); ProcessSignal.SIGTERM.watch().listen((ProcessSignal signal) {
exitCompleter.complete(0); subscription.cancel();
}); exitCompleter.complete(0);
});
}
// Wait for the log reader to be finished. // Wait for the log reader to be finished.
int result = await exitCompleter.future; int result = await exitCompleter.future;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment