Index: sdk/lib/_internal/pub/lib/src/sdk.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/sdk.dart b/sdk/lib/_internal/pub/lib/src/sdk.dart |
index 6b304d9e4cadb0623658d1e414dcf992566496f1..0fbe5f966eeb3fb69f4c2272d999ce4868dcfd5b 100644 |
--- a/sdk/lib/_internal/pub/lib/src/sdk.dart |
+++ b/sdk/lib/_internal/pub/lib/src/sdk.dart |
@@ -28,8 +28,8 @@ String get rootDirectory { |
return dir; |
} |
- throw new Exception('DART_SDK environment variable not set, unable to find ' |
- 'the SDK.'); |
+ // Assume the Dart executable is always coming from the SDK. |
+ return path.dirname(path.dirname(new Options().executable)); |
} |
/// Gets the SDK's revision number formatted to be a semantic version. |