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

Unified Diff: lib/src/sdk.dart

Issue 1166623003: Prefer the Dart repo's SDK to DART_SDK. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 7 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 | no next file » | 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 3adc9c743c414b568e38bdda9a6d5399006776d2..92e9cec251f4b202e9b3f4c90ced68896ec80e00 100644
--- a/lib/src/sdk.dart
+++ b/lib/src/sdk.dart
@@ -18,11 +18,11 @@ import 'io.dart';
/// when building Observatory), this will be the repo's "sdk/" directory, which
/// doesn't look exactly like the built SDK.
final String rootDirectory = (() {
+ if (runningFromDartRepo) return p.join(dartRepoRoot, 'sdk');
+
var dartSdk = Platform.environment["DART_SDK"];
if (dartSdk != null) return dartSdk;
- if (runningFromDartRepo) return p.join(dartRepoRoot, 'sdk');
-
// 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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698