Skip to content

Commit

Permalink
trying to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Dec 6, 2021
1 parent 1fc5d25 commit 4907df5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -37,7 +37,6 @@ jobs:
if: always() && steps.install.outcome == 'success'

test_dart:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -61,7 +60,6 @@ jobs:
if: always() && steps.install.outcome == 'success'

test_flutter:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
13 changes: 4 additions & 9 deletions lib/src/utils.dart
Expand Up @@ -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');

0 comments on commit 4907df5

Please sign in to comment.