diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71427be..a944f94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,6 @@ jobs: if: always() && steps.install.outcome == 'success' test_dart: - needs: analyze runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -61,7 +60,6 @@ jobs: if: always() && steps.install.outcome == 'success' test_flutter: - needs: analyze runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/lib/src/utils.dart b/lib/src/utils.dart index ed337e7..64e85d0 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -3,22 +3,17 @@ import 'dart:io'; import 'package:path/path.dart' as p; /// The path to the root directory of the SDK. -final String _sdkDir = (() { +final String dartPath = (() { final executableBaseName = p.basename(Platform.resolvedExecutable); - String dartSdkDir; if (executableBaseName == 'flutter_tester') { final flutterRoot = Platform.environment['FLUTTER_ROOT']!; - dartSdkDir = p.join(flutterRoot, 'bin', 'cache', 'dart-sdk'); + return p.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', 'dart'); } else { + assert(executableBaseName == 'dart'); // The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is // "/path/to/sdk". - dartSdkDir = p.dirname(p.dirname(Platform.resolvedExecutable)); + return Platform.resolvedExecutable; } - - assert(FileSystemEntity.isFileSync(p.join(dartSdkDir, 'version'))); - return dartSdkDir; })(); - -final String dartPath = p.join(_sdkDir, 'bin', 'dart');