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)); |