Make ProcessSignals portable (#8779)

* Make ProcessSignals portable

This removes the need to wrap unsupported signals with in `if (!platform.isWindows) ..`.

It also allows us to implement a work around for breaking the Windows console when flutter is exited with Ctrl+C.

* review comments

* adding tests

* add license header
This commit is contained in:
Michael Goderbauer
2017-03-15 11:28:14 -07:00
committed by GitHub
parent a097396f56
commit 15330ffbc4
5 changed files with 120 additions and 16 deletions

View File

@@ -59,6 +59,7 @@ import 'src/usage.dart';
///
/// This function is intended to be used from the `flutter` command line tool.
Future<Null> main(List<String> args) async {
SigintProcessSignal.instance.init();
final bool verbose = args.contains('-v') || args.contains('--verbose');
final bool help = args.contains('-h') || args.contains('--help') ||
(args.isNotEmpty && args.first == 'help') || (args.length == 1 && verbose);