Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Unified Diff: pkg/analyzer/lib/src/lint/analysis.dart

Issue 2844883005: Use the dart:io Platform.resolvedExecutable API to locate the Dart SDK. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/util/sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/lint/analysis.dart
diff --git a/pkg/analyzer/lib/src/lint/analysis.dart b/pkg/analyzer/lib/src/lint/analysis.dart
index 57d85e258fb0b302f7e95029857da220edc9940f..84a8a3c7f7b19629c4a9951abace3d29444efa0b 100644
--- a/pkg/analyzer/lib/src/lint/analysis.dart
+++ b/pkg/analyzer/lib/src/lint/analysis.dart
@@ -21,7 +21,7 @@ import 'package:analyzer/src/lint/linter.dart';
import 'package:analyzer/src/lint/project.dart';
import 'package:analyzer/src/lint/registry.dart';
import 'package:analyzer/src/services/lint.dart';
-import 'package:cli_util/cli_util.dart' as cli_util;
+import 'package:analyzer/src/util/sdk.dart';
import 'package:package_config/packages.dart' show Packages;
import 'package:package_config/packages_file.dart' as pkgfile show parse;
import 'package:package_config/src/packages_impl.dart' show MapPackages;
@@ -134,12 +134,8 @@ class LintDriver {
}
String get sdkDir {
- if (options.dartSdkPath != null) {
- return options.dartSdkPath;
- }
- // In case no SDK has been specified, fall back to inferring it
- // TODO: pass args to cli_util
- return cli_util.getSdkDir().path;
+ // In case no SDK has been specified, fall back to inferring it.
+ return options.dartSdkPath ?? getSdkPath();
}
List<AnalysisErrorInfo> analyze(Iterable<io.File> files) {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/util/sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698