Skip to content

Commit

Permalink
Merge pull request #630 from leoafarias/feature/added-global-command-…
Browse files Browse the repository at this point in the history
…fallback

Added fallback to global version
  • Loading branch information
leoafarias authored Feb 16, 2024
2 parents c0029c3 + 81b89db commit 0d866fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/utils/commands.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:io';

import '../models/cache_flutter_version_model.dart';
import '../services/global_version_service.dart';
import 'context.dart';
import 'helpers.dart';
import 'run_command.dart';
Expand All @@ -15,6 +16,8 @@ Future<ProcessResult> runFlutter(
bool? echoOutput,
bool? throwOnError,
}) {
version ??= GlobalVersionService.fromContext.getGlobal();

if (version == null) {
return _runCmd(_flutterCmd, args: args);
}
Expand Down

0 comments on commit 0d866fe

Please sign in to comment.