Skip to content

Commit

Permalink
run checkForUpdates in isolate
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Baumann committed Oct 10, 2023
1 parent 3e3ee5a commit b9d4e9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sidekick_core/lib/sidekick_core.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/// The core library for Sidekick CLIs
library sidekick_core;

import 'dart:isolate';

import 'package:cli_completion/cli_completion.dart';
import 'package:sidekick_core/sidekick_core.dart';
import 'package:sidekick_core/src/commands/update_command.dart';
Expand Down Expand Up @@ -295,7 +297,7 @@ class SidekickCommandRunner<T> extends CompletionCommandRunner<T> {
// print warning if CLI update is available
// TODO prevent multiple update checks when a command start another command

updateCheck = _checkForUpdates();
updateCheck = Isolate.run(_checkForUpdates);
}

if (parsedArgs['version'] == true) {
Expand Down

0 comments on commit b9d4e9a

Please sign in to comment.