File tree Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,16 @@ Future<void> main(List<String> arguments) async {
27
27
negatable: false ,
28
28
help: kCommandHelpVersion,
29
29
)
30
- ..argParser.addFlag (
31
- ksEnableAnalytics,
32
- negatable: false ,
33
- help: kCommandHelpEnableAnalytics,
34
- )
35
- ..argParser.addFlag (
36
- ksDisableAnalytics,
37
- negatable: false ,
38
- help: kCommandHelpDisableAnalytics,
39
- )
30
+ // ..argParser.addFlag(
31
+ // ksEnableAnalytics,
32
+ // negatable: false,
33
+ // help: kCommandHelpEnableAnalytics,
34
+ // )
35
+ // ..argParser.addFlag(
36
+ // ksDisableAnalytics,
37
+ // negatable: false,
38
+ // help: kCommandHelpDisableAnalytics,
39
+ // )
40
40
..addCommand (CreateCommand ())
41
41
..addCommand (DeleteCommand ())
42
42
..addCommand (CompileCommand ())
@@ -52,7 +52,9 @@ Future<void> main(List<String> arguments) async {
52
52
exit (0 );
53
53
}
54
54
55
- if (_handleAnalytics (argResults)) exit (0 );
55
+ /// Disable Analytics until we find how to resolve FileSystemException
56
+ /// triggered twice
57
+ // if (_handleAnalytics(argResults)) exit(0);
56
58
57
59
await _notifyNewVersionAvailable (arguments: arguments);
58
60
Original file line number Diff line number Diff line change @@ -25,20 +25,30 @@ class PosthogService {
25
25
final _baseUri = Uri .parse ('https://app.posthog.com/capture' );
26
26
27
27
/// Is this the first time the tool has run?
28
- bool get isFirstRun => _box.get (_isFirstRunKey, defaultValue: true );
28
+ // bool get isFirstRun => _box.get(_isFirstRunKey, defaultValue: true);
29
+ bool get isFirstRun => false ;
29
30
30
31
/// Will analytics data be sent?
31
- bool get enabled => _box.get (_isEnabledKey, defaultValue: false );
32
+ // bool get enabled => _box.get(_isEnabledKey, defaultValue: false);
33
+ bool get enabled => false ;
32
34
33
35
/// Enables or disables sending of analytics data.
34
36
Future <void > enable (bool value) async {
37
+ /// Disable Analytics until we find how to resolve FileSystemException
38
+ /// triggered twice
39
+ return ;
40
+
35
41
await _box.put (_isFirstRunKey, false );
36
42
await _box.put (_isEnabledKey, value);
37
43
}
38
44
39
45
late Box _box;
40
46
41
47
Future <void > init () async {
48
+ /// Disable Analytics until we find how to resolve FileSystemException
49
+ /// triggered twice
50
+ return ;
51
+
42
52
Hive .init ('${_pathService .configHome .path }/stacked' );
43
53
44
54
_box = await Hive .openBox (
You can’t perform that action at this time.
0 commit comments