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

Unified Diff: lib/src/util/io.dart

Issue 1165313002: Don't resolve symlinks on Windows to find the SDK. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 6 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/util/io.dart
diff --git a/lib/src/util/io.dart b/lib/src/util/io.dart
index b66e41cfd8ad4cf98b09942c8ea5a3bc5efefbce..896a7405468021894f9742dfa90638cd57f0fc4d 100644
--- a/lib/src/util/io.dart
+++ b/lib/src/util/io.dart
@@ -23,7 +23,12 @@ const _carriageReturn = 0xD;
/// 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));
})();
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698