Workaround for intermittent pub crash on macOS. (#9832)

Eagerly initialize libnotify by accessing the current date. See dart-lang/sdk#29539 for details.

Fixes #9727.
This commit is contained in:
Jakob Andersen
2017-05-05 13:30:48 +02:00
committed by GitHub
parent 74e656752c
commit 7818ea43dc

View File

@@ -4,6 +4,14 @@
import 'package:flutter_tools/executable.dart' as executable;
// Temporary workaround for https://github.com/flutter/flutter/issues/9727
bool get initializeLibNotify {
final DateTime date = new DateTime.now();
return date.month == 1;
}
void main(List<String> args) {
// ignore: UNUSED_LOCAL_VARIABLE
final bool x = initializeLibNotify;
executable.main(args);
}