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

Unified Diff: lib/src/sdk.dart

Issue 1220553002: Ignore the DART_SDK variable in pub. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: change target branch Created 5 years, 6 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 | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/sdk.dart
diff --git a/lib/src/sdk.dart b/lib/src/sdk.dart
index 92e9cec251f4b202e9b3f4c90ced68896ec80e00..d0ef3517652cf0ce9cd7513d715fe468a6f6dc91 100644
--- a/lib/src/sdk.dart
+++ b/lib/src/sdk.dart
@@ -20,12 +20,9 @@ import 'io.dart';
final String rootDirectory = (() {
if (runningFromDartRepo) return p.join(dartRepoRoot, 'sdk');
- var dartSdk = Platform.environment["DART_SDK"];
- if (dartSdk != null) return dartSdk;
-
// The Dart exectuable is in "/path/to/sdk/bin/dart", so two levels up is
// "/path/to/sdk".
- var aboveExecutable = p.dirname(p.dirname(Platform.executable));
+ var aboveExecutable = p.dirname(p.dirname(Platform.resolvedExecutable));
assert(fileExists(p.join(aboveExecutable, 'version')));
return aboveExecutable;
})();
« no previous file with comments | « no previous file | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698