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

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

Issue 1133603005: pkg/test: handle symlinked dart executable (Closed) Base URL: https://github.com/dart-lang/test.git@master
Patch Set: better todo Created 5 years, 7 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 | « no previous file | no next file » | 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 50b142413292c37baa874425b1bf3c35aa31a15f..b66e41cfd8ad4cf98b09942c8ea5a3bc5efefbce 100644
--- a/lib/src/util/io.dart
+++ b/lib/src/util/io.dart
@@ -21,8 +21,11 @@ const _newline = 0xA;
const _carriageReturn = 0xD;
/// The root directory of the Dart SDK.
-final String sdkDir =
- p.dirname(p.dirname(Platform.executable));
+final String sdkDir = (() {
+ // TODO(kevmoo): work-around for accessing the SDK root dartbug.com/16994
+ var path = new File(Platform.executable).resolveSymbolicLinksSync();
+ return p.dirname(p.dirname(path));
+})();
/// The version of the Dart SDK currently in use.
final Version _sdkVersion = new Version.parse(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698