Don't resolve symlinks on Windows to find the SDK.
Platform.executable doesn't include the ".exe" extension on Windows,
which causes symlink resolution for it to fail.
Closes #133
R=kevmoo@google.com
Review URL: https://codereview.chromium.org//1165313002.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed10922..a5ffccb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 0.12.3+1
+
+* Fix a bug that caused the test runner to crash on Windows because symlink
+ resolution failed.
+
## 0.12.3
* If a future matched against the `completes` or `completion()` matcher throws
diff --git a/lib/src/util/io.dart b/lib/src/util/io.dart
index b66e41c..896a740 100644
--- a/lib/src/util/io.dart
+++ b/lib/src/util/io.dart
@@ -23,7 +23,12 @@
/// The root directory of the Dart SDK.
final String sdkDir = (() {
// TODO(kevmoo): work-around for accessing the SDK root dartbug.com/16994
- var path = new File(Platform.executable).resolveSymbolicLinksSync();
+ //
+ // Don't resolve symlinks on Windows because of issue 133. Once the TODO above
+ // is resolved, we won't have to do explicit symlink resolution anyway.
+ var path = Platform.isWindows
+ ? Platform.executable
+ : new File(Platform.executable).resolveSymbolicLinksSync();
return p.dirname(p.dirname(path));
})();
diff --git a/pubspec.yaml b/pubspec.yaml
index ba6da81..92a6b7b 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: test
-version: 0.12.3
+version: 0.12.3+1
author: Dart Team <misc@dartlang.org>
description: A library for writing dart unit tests.
homepage: https://github.com/dart-lang/test