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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user