Skip to content

Commit afc0eb7

Browse files
committed
Workaround for intermittent pub crash on macOS.
Eagerly initialize libnotify by accessing the current date. See dart-lang/sdk#29539 for details. Fixes flutter#9727.
1 parent 20da5c1 commit afc0eb7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/flutter_tools/bin/flutter_tools.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
import 'package:flutter_tools/executable.dart' as executable;
66

7+
// Temporary workaround for https://github.com/flutter/flutter/issues/9727
8+
bool get initializeLibNotify {
9+
final DateTime date = new DateTime.now();
10+
return date.month == 1;
11+
}
12+
713
void main(List<String> args) {
14+
// ignore: UNUSED_LOCAL_VARIABLE
15+
final bool x = initializeLibNotify;
816
executable.main(args);
917
}

0 commit comments

Comments
 (0)