Index: utils/pub/sdk_source.dart |
diff --git a/utils/pub/sdk_source.dart b/utils/pub/sdk_source.dart |
index 3662f853fa4530280307cbfe9e5b2369fb43aa6c..54fa218c231f7ca6351467e33c61b12c906635eb 100644 |
--- a/utils/pub/sdk_source.dart |
+++ b/utils/pub/sdk_source.dart |
@@ -22,9 +22,15 @@ class SdkSource extends Source { |
/** |
* The root directory of the Dart SDK. |
*/ |
- final String rootDir; |
+ final String _rootDir; |
- SdkSource(this.rootDir); |
+ String get rootDir() { |
+ if (_rootDir != null) return _rootDir; |
+ throw "Pub can't find the Dart SDK. Please set the DART_SDK environment " |
Bob Nystrom
2012/07/12 16:49:27
Instead of checking here, why not having the const
nweiz
2012/07/12 18:44:30
We want pub to work without DART_SDK if it doesn't
Bob Nystrom
2012/07/12 21:07:57
OK, cool.
|
+ "variable to the Dart SDK directory."; |
+ } |
+ |
+ SdkSource(this._rootDir); |
/** |
* An SDK package has no dependencies. Its version number is inferred from the |